Get Off My Lawn
Get Off My Lawn

Reputation: 36341

npm adduser errors with a 400 error

I am trying to do npm adduser, I enter in all the info it asks for and when I do I get the following error:

npm http PUT https://registry.npmjs.org/-/user/org.couchdb.user:thecolorred
npm http 400 https://registry.npmjs.org/-/user/org.couchdb.user:thecolorred
npm ERR! Error: Unknown error while authenticating : -/user/org.couchdb.user:thecolorred
npm ERR!     at RegClient.<anonymous> (/usr/share/npm/node_modules/npm-registry-client/lib/request.js:272:14)
npm ERR!     at Request.self.callback (/usr/lib/nodejs/request/index.js:148:22)
npm ERR!     at Request.EventEmitter.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/usr/lib/nodejs/request/index.js:896:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/usr/lib/nodejs/request/index.js:847:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
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!     <[email protected]>

npm ERR! System Linux 3.13.0-34-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "adduser"
npm ERR! cwd /etc/node-http-server/modules/tpl
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /etc/node-http-server/modules/tpl/npm-debug.log
npm ERR! not ok code 0

The error tells me to check the log file, so I check the log file and I get this output:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'adduser' ]
2 info using [email protected]
3 info using [email protected]
4 verbose adduser before first PUT { name: 'thecolorred',
4 verbose adduser   salt: 'XXXXX',
4 verbose adduser   password_sha: 'XXXXX',
4 verbose adduser   email: '[email protected]',
4 verbose adduser   _id: 'org.couchdb.user:thecolorred',
4 verbose adduser   type: 'user',
4 verbose adduser   roles: [],
4 verbose adduser   date: '2015-04-10T23:49:58.581Z' }
5 verbose url raw /-/user/org.couchdb.user:thecolorred
6 verbose url resolving [ 'https://registry.npmjs.org/',
6 verbose url resolving   './-/user/org.couchdb.user:thecolorred' ]
7 verbose url resolved https://registry.npmjs.org/-/user/org.couchdb.user:thecolorred
8 info trying registry request attempt 1 at 19:49:58
9 http PUT https://registry.npmjs.org/-/user/org.couchdb.user:thecolorred
10 http 400 https://registry.npmjs.org/-/user/org.couchdb.user:thecolorred
11 verbose adduser back [ [Error: Unknown error while authenticating : -/user/org.couchdb.user:thecolorred],
11 verbose adduser   { ok: false, error: 'Unknown error while authenticating' },
11 verbose adduser   '{"ok":false,"error":"Unknown error while authenticating"}' ]
12 error Error: Unknown error while authenticating : -/user/org.couchdb.user:thecolorred
12 error     at RegClient.<anonymous> (/usr/share/npm/node_modules/npm-registry-client/lib/request.js:272:14)
12 error     at Request.self.callback (/usr/lib/nodejs/request/index.js:148:22)
12 error     at Request.EventEmitter.emit (events.js:98:17)
12 error     at Request.<anonymous> (/usr/lib/nodejs/request/index.js:896:14)
12 error     at Request.EventEmitter.emit (events.js:117:20)
12 error     at IncomingMessage.<anonymous> (/usr/lib/nodejs/request/index.js:847:12)
12 error     at IncomingMessage.EventEmitter.emit (events.js:117:20)
12 error     at _stream_readable.js:920:16
12 error     at process._tickCallback (node.js:415:13)
13 error If you need help, you may report this log at:
13 error     <http://github.com/isaacs/npm/issues>
13 error or email it to:
13 error     <[email protected]>
14 error System Linux 3.13.0-34-generic
15 error command "/usr/bin/nodejs" "/usr/bin/npm" "adduser"
16 error cwd /etc/node-http-server/modules/tpl
17 error node -v v0.10.25
18 error npm -v 1.3.10
19 verbose exit [ 1, true ]

I have no idea what it is telling me, why is adduser not working?

Upvotes: 1

Views: 1424

Answers (1)

Tristan Foureur
Tristan Foureur

Reputation: 1657

Your npm version (1.3.10) is too old and some non-backward compatible changes have been made since then.

Current stable version is 2.7.6

Upvotes: 2

Related Questions