Skip to content

Sinopia with Nginx and Proxy #335

@akshayakrsh

Description

@akshayakrsh

Hi,

I have setup a Sinopia server with Nginx installed on it. My nginx configuration looks like this:

server {
  listen  80 default_server;
  location / {
    proxy_pass         http://127.0.0.1:4873;
  }
}

and my sinopia server is running via pm2 => pm2 start which sinopia -f. Lastly, my config yaml is a copy of https://github.com/rlidwka/sinopia/blob/master/conf/full.yaml (with web version enabled).

I am facing 2 problems:

  1. Web Interface: The web interface of sinopia server when i hit the url http://server_ip/ is completely black and white. See the screenshot below to see what I mean.

image

  1. NPM Registry lookup: The sinopia server is unable to do lookup in the official npm registry. I have already added registry on my machine using npm set registry http://SERVER_URL/sinopia but after that when I run npm install <module_name> e.g. "qs", it fails! The verbose error log is:
npm install qs --verbose
npm info it worked if it ends with ok
npm verb cli [ 'node', '/usr/local/bin/npm', 'install', 'qs', '--verbose' ]
npm info using npm@2.13.0
npm info using node@v0.12.7
npm verb node symlink /usr/local/bin/node
npm verb install initial load of /Users/akshayakumarsharma/Workspace/myapp/package.json
npm verb readDependencies loading dependencies from /Users/akshayakumarsharma/Workspace/myapp/package.json
npm verb cache add spec qs
npm verb addNamed "*" is a valid semver range for qs
npm verb addNameRange registry:http://10.2.117.158/sinopia/qs not in flight; fetching
npm verb request uri http://10.2.117.158/sinopia/qs
npm verb request no auth needed
npm info attempt registry request try #1 at 00:55:52
npm verb request id 1013938c0b7c9c20
npm http request GET http://10.2.117.158/sinopia/qs
npm http 404 http://10.2.117.158/sinopia/qs
npm verb headers { server: 'nginx/1.0.15',
npm verb headers   date: 'Tue, 03 Nov 2015 17:56:20 GMT',
npm verb headers   'content-type': 'application/json; charset=utf-8',
npm verb headers   connection: 'keep-alive',
npm verb headers   'x-powered-by': 'Sinopia/1.4.0',
npm verb headers   'content-length': '39',
npm verb headers   etag: 'W/"27-ae46d555"',
npm verb headers   vary: 'Accept-Encoding',
npm verb headers   'x-status-cat': 'http://flic.kr/p/aV6juR' }
npm verb stack Error: version not found: qs : qs
npm verb stack     at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:247:14)
npm verb stack     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:170:14)
npm verb stack     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:197:22)
npm verb stack     at Request.emit (events.js:110:17)
npm verb stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1050:14)
npm verb stack     at Request.emit (events.js:129:20)
npm verb stack     at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:996:12)
npm verb stack     at IncomingMessage.emit (events.js:129:20)
npm verb stack     at _stream_readable.js:908:16
npm verb stack     at process._tickCallback (node.js:355:11)
npm verb statusCode 404
npm verb pkgid qs
npm verb cwd /Users/akshayakumarsharma/Workspace/myapp
npm ERR! Darwin 15.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "qs" "--verbose"
npm ERR! node v0.12.7
npm ERR! npm  v2.13.0
npm ERR! code E404

npm ERR! 404 version not found: qs : qs
npm ERR! 404
npm ERR! 404 'qs' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'myapp'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm verb exit [ 1, true ]

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/akshayakumarsharma/Workspace/myapp/npm-debug.log

Can you please suggest what should I do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions