Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Registry error parsing json ? #4078

Closed
xoxotw opened this issue Nov 2, 2013 · 1 comment
Closed

Registry error parsing json ? #4078

xoxotw opened this issue Nov 2, 2013 · 1 comment

Comments

@xoxotw
Copy link

xoxotw commented Nov 2, 2013

I am trying to : npm install colors

I get this:

xoxotw@mycpu ~/Programming/nodeJS/webServer $ npm install colors
npm http GET http://85.10.209.91/colors
npm http 404 http://85.10.209.91/colors
npm ERR! registry error parsing json
npm ERR! SyntaxError: Unexpected token <
npm ERR! at Object.parse (native)
npm ERR! at RegClient. (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:238:23)
npm ERR! at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:129:22)
npm ERR! at Request.EventEmitter.emit (events.js:106:17)
npm ERR! at Request. (/usr/local/lib/node_modules/npm/node_modules/request/request.js:873:14)
npm ERR! at Request.EventEmitter.emit (events.js:125:20)
npm ERR! at IncomingMessage. (/usr/local/lib/node_modules/npm/node_modules/request/request.js:824:12)
npm ERR! at IncomingMessage.EventEmitter.emit (events.js:125:20)
npm ERR! at _stream_readable.js:896:16
npm ERR! at process._tickCallback (node.js:316:11)
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com

npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "colors"
npm ERR! cwd /home/xoxotw/Programming/nodeJS/webServer
npm ERR! node -v v0.11.8-pre
npm ERR! npm -v 1.3.13
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/xoxotw/Programming/nodeJS/webServer/npm-debug.log
npm ERR! not ok code 0

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'colors' ]
2 info using npm@1.3.13
3 info using node@v0.11.8-pre
4 verbose cache add [ 'colors', null ]
5 verbose cache add name=undefined spec="colors" args=["colors",null]
6 verbose parsed url { protocol: null,
6 verbose parsed url slashes: null,
6 verbose parsed url auth: null,
6 verbose parsed url host: null,
6 verbose parsed url port: null,
6 verbose parsed url hostname: null,
6 verbose parsed url hash: null,
6 verbose parsed url search: null,
6 verbose parsed url query: null,
6 verbose parsed url pathname: 'colors',
6 verbose parsed url path: 'colors',
6 verbose parsed url href: 'colors' }
7 silly lockFile f8bd6967-colors colors
8 verbose lock colors /home/xoxotw/.npm/f8bd6967-colors.lock
9 silly lockFile f8bd6967-colors colors
10 silly lockFile f8bd6967-colors colors
11 verbose addNamed [ 'colors', '' ]
12 verbose addNamed [ null, '' ]
13 silly lockFile 647b9942-colors colors@
14 verbose lock colors@ /home/xoxotw/.npm/647b9942-colors.lock
15 silly addNameRange { name: 'colors', range: '
', hasData: false }
16 verbose url raw colors
17 verbose url resolving [ 'http://85.10.209.91/', './colors' ]
18 verbose url resolved http://85.10.209.91/colors
19 info trying registry request attempt 1 at 18:56:01
20 http GET http://85.10.209.91/colors
21 http 404 http://85.10.209.91/colors
22 verbose bad json
22 verbose bad json
22 verbose bad json <title>404 Not Found</title>
22 verbose bad json
22 verbose bad json

Not Found


22 verbose bad json

The requested URL /colors was not found on this server.


22 verbose bad json

22 verbose bad json Apache/2.2.14 (Ubuntu) Server at 85.10.209.91 Port 80
22 verbose bad json
23 error registry error parsing json
24 silly registry.get cb [ 404,
24 silly registry.get { date: 'Sat, 02 Nov 2013 17:56:01 GMT',
24 silly registry.get server: 'Apache/2.2.14 (Ubuntu)',
24 silly registry.get vary: 'Accept-Encoding',
24 silly registry.get 'content-length': '282',
24 silly registry.get connection: 'close',
24 silly registry.get 'content-type': 'text/html; charset=iso-8859-1' } ]
25 silly lockFile 647b9942-colors colors@
26 silly lockFile 647b9942-colors colors@
27 error SyntaxError: Unexpected token <
27 error at Object.parse (native)
27 error at RegClient. (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:238:23)
27 error at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:129:22)
27 error at Request.EventEmitter.emit (events.js:106:17)
27 error at Request. (/usr/local/lib/node_modules/npm/node_modules/request/request.js:873:14)
27 error at Request.EventEmitter.emit (events.js:125:20)
27 error at IncomingMessage. (/usr/local/lib/node_modules/npm/node_modules/request/request.js:824:12)
27 error at IncomingMessage.EventEmitter.emit (events.js:125:20)
27 error at _stream_readable.js:896:16
27 error at process._tickCallback (node.js:316:11)
28 error If you need help, you may report this log at:
28 error http://github.com/isaacs/npm/issues
28 error or email it to:
28 error npm-@googlegroups.com
29 error System Linux 3.2.0-23-generic
30 error command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "colors"
31 error cwd /home/xoxotw/Programming/nodeJS/webServer
32 error node -v v0.11.8-pre
33 error npm -v 1.3.13
34 verbose exit [ 1, true ]

@robertkowalski
Copy link
Contributor

this is a duplicate of #4072 - the registry is not using apache

Regarding:

npm http GET http://85.10.209.91/colors
npm http 404 http://85.10.209.91/colors

Please set the right registry url with:

npm config set registry http://registry.npmjs.org

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants