Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

npm adduser fails #3852

Closed
evil-shrike opened this Issue · 25 comments
@evil-shrike

I saw the same issues in the tracker, but they are closed as 'fixed' and I'm experiencing such an issue right now.

I'm trying to authorize one more machine for my npm's account. I did this before on other machine and everything worked fine. Now I'm getting error.

Here's the whole output:

D:\...\grunt\grunt-croc-qunit>npm adduser
Username: shrike
Password:
Email: ...
npm http PUT http://registry.npmjs.org/-/user/org.couchdb.user:shrike
npm http 409 http://registry.npmjs.org/-/user/org.couchdb.user:shrike
npm http GET http://registry.npmjs.org/-/user/org.couchdb.user:shrike
npm http 200 http://registry.npmjs.org/-/user/org.couchdb.user:shrike
npm http PUT http://registry.npmjs.org/-/user/org.couchdb.user:shrike/-rev/4-8526ee00fa3af236f385798a87478d33
npm http 404 http://registry.npmjs.org/-/user/org.couchdb.user:shrike/-rev/4-8526ee00fa3af236f385798a87478d33
npm ERR! Error: not_found missing: -/user/org.couchdb.user:shrike/-rev/4-8526ee00fa3af236f385798a87478d33
npm ERR!     at RegClient.<anonymous> (Z:\Prog\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:269:14)
npm ERR!     at Request.self.callback (Z:\Prog\nodejs\node_modules\npm\node_modules\request\index.js:142:22)
npm ERR!     at Request.EventEmitter.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (Z:\Prog\nodejs\node_modules\npm\node_modules\request\index.js:856:14)
npm ERR!     at Request.EventEmitter.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (Z:\Prog\nodejs\node_modules\npm\node_modules\request\index.js:808:12)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:883:14
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!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "Z:\\Prog\\nodejs\\\\node.exe" "Z:\\Prog\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "adduser"
npm ERR! cwd D:\Work\R-n-D\XFW3\Sources\WebClient\Repo\Client\grunt\grunt-croc-qunit
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     D:\Work\R-n-D\XFW3\Sources\WebClient\Repo\Client\grunt\grunt-croc-qunit\npm-debug.log
npm ERR! not ok code 0

When I open this url 'http://registry.npmjs.org/-/user/org.couchdb.user:shrike/-rev/4-8526ee00fa3af236f385798a87478d33' in the browser I get the same error :

{"error":"not_found","reason":"missing"}
@dchem

I'm having the same issue.

@travisjeffery

ah! npm was out of date, updating it worked!

@dchem

updating the npm did the trick. My npm ver is 1.3.2 now.

@luk-

@evil-shrike have you tried updating?

@evil-shrike

@luk- Yeah, I've updated to the latest nodejs/npm (0.10.18/1.3.8). Nothing changes.

I've captured server response for 'npm adduser'.
First it sends PUT http://registry.npmjs.org/-/user/org.couchdb.user:shrike HTTP/1.1 and gets a respose:
HTTP/1.1 409 Conflict
Server: CouchDB/1.3.1 (Erlang OTP/R15B03)
Date: Wed, 11 Sep 2013 16:33:44 GMT
Content-Type: application/json
Content-Length: 58
Cache-Control: must-revalidate
{"error":"conflict","reason":"Document update conflict."}

after that npm sends GET http://registry.npmjs.org/-/user/org.couchdb.user:shrike and gets a json with the user info.
Then it tries to update it sending PUT http://registry.npmjs.org/-/user/org.couchdb.user:shrike/-rev/5-16bf861ed001535162dc364c02b056c2 HTTP/1.1
and gets 404 error with json {"error":"not_found","reason":"missing"}

Also note that I'm trying to register a machine for existing account (not register a new account).

I also tried to execute 'npm login'. It has absolutely the same outcome.

@luk-

We'll need to ping @isaacs for this one.

@punund

Having the same issue.

node v0.10.5
npm 1.3.15

@BernhardBezdek

Had the same problem until now and was able to solve it by install node v0.10.23
Previously 0.10.22 was installed on my machine

@jazlalli

Hi
I'm experiencing very similar issues to this. I was unable to run npm adduser, and based on the comments above, I updated node and npm. However, adduser still fails, seems to complain about the email field, despite not prompting me to enter it.

I actually created the user via npmjs.org, and I'm successfully logged in on the site. Despite that, http://registry.npmjs.org/-/user/org.couchdb.user:jazlalli responds with "not_found".

I'm running on Windows 7, version details;

node -v: v0.10.24
npm -v: 1.3.21

npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'adduser' ]
2 info using npm@1.3.21
3 info using node@v0.10.24
4 verbose node symlink C:\Program Files\nodejs\node.exe
5 error Error: default value must be string or number
5 error at read (C:\Program Files\nodejs\node_modules\npm\node_modules\read\lib\read.js:15:11)
5 error at readEmail (C:\Program Files\nodejs\node_modules\npm\lib\adduser.js:96:3)
5 error at loop (C:\Program Files\nodejs\node_modules\npm\lib\adduser.js:33:20)
5 error at C:\Program Files\nodejs\node_modules\npm\lib\adduser.js:89:5
5 error at Interface.onLine (C:\Program Files\nodejs\node_modules\npm\node_modules\read\lib\read.js:111:5)
5 error at Interface.EventEmitter.emit (events.js:95:17)
5 error at Interface._onLine (readline.js:202:10)
5 error at Interface._line (readline.js:531:8)
5 error at Interface._ttyWrite (readline.js:760:14)
5 error at ReadStream.onkeypress (readline.js:99:10)
6 error If you need help, you may report this entire log,
6 error including the npm and node versions, at:
6 error http://github.com/isaacs/npm/issues
7 error System Windows_NT 6.1.7601
8 error command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "adduser"
9 error cwd C:\GitHub-Personal\refractmq
10 error node -v v0.10.24
11 error npm -v 1.3.21
12 verbose exit [ 1, true ]

@index0h

Same problem

index0h@index0h:~$ npm adduser
Username: index0h
Password: 
npm ERR! Error: default value must be string or number
npm ERR!     at read (/usr/lib/node_modules/npm/node_modules/read/lib/read.js:15:11)
npm ERR!     at readEmail (/usr/lib/node_modules/npm/lib/adduser.js:96:3)
npm ERR!     at loop (/usr/lib/node_modules/npm/lib/adduser.js:33:20)
npm ERR!     at /usr/lib/node_modules/npm/lib/adduser.js:89:5
npm ERR!     at Interface.onLine (/usr/lib/node_modules/npm/node_modules/read/lib/read.js:111:5)
npm ERR!     at Interface.EventEmitter.emit (events.js:95:17)
npm ERR!     at Interface._onLine (readline.js:202:10)
npm ERR!     at Interface._line (readline.js:531:8)
npm ERR!     at Interface._ttyWrite (readline.js:760:14)
npm ERR!     at ReadStream.onkeypress (readline.js:99:10)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/isaacs/npm/issues>

npm ERR! System Linux 3.11.0-14-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "adduser"
npm ERR! cwd /home/index0h
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/index0h/npm-debug.log
npm ERR! not ok code 0
index0h@index0h:~$ cat npm-debug.log 
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'adduser' ]
2 info using npm@1.3.21
3 info using node@v0.10.24
4 verbose node symlink /usr/bin/node
5 error Error: default value must be string or number
5 error     at read (/usr/lib/node_modules/npm/node_modules/read/lib/read.js:15:11)
5 error     at readEmail (/usr/lib/node_modules/npm/lib/adduser.js:96:3)
5 error     at loop (/usr/lib/node_modules/npm/lib/adduser.js:33:20)
5 error     at /usr/lib/node_modules/npm/lib/adduser.js:89:5
5 error     at Interface.onLine (/usr/lib/node_modules/npm/node_modules/read/lib/read.js:111:5)
5 error     at Interface.EventEmitter.emit (events.js:95:17)
5 error     at Interface._onLine (readline.js:202:10)
5 error     at Interface._line (readline.js:531:8)
5 error     at Interface._ttyWrite (readline.js:760:14)
5 error     at ReadStream.onkeypress (readline.js:99:10)
6 error If you need help, you may report this *entire* log,
6 error including the npm and node versions, at:
6 error     <http://github.com/isaacs/npm/issues>
7 error System Linux 3.11.0-14-generic
8 error command "/usr/bin/node" "/usr/bin/npm" "adduser"
9 error cwd /home/index0h
10 error node -v v0.10.24
11 error npm -v 1.3.21
12 verbose exit [ 1, true ]
@jfpsf

I keep getting the "User Not Found" error also. I have the latest version of Node and NPM.

@thebapi

hi i am also getting same problem.

PUT https://registry.npmjs.org/-/user/org.couchdb.user:thebapi
npm http 409 https://registry.npmjs.org/-/user/org.couchdb.user:thebapi
npm http GET https://registry.npmjs.org/-/user/org.couchdb.user:thebapi
npm http 404 https://registry.npmjs.org/-/user/org.couchdb.user:thebapi
npm ERR! Error: not_found missing: -/user/org.couchdb.user:thebapi
npm ERR! at RegClient. (/usr/local/Cellar/node/0.10.22/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:272:14)
npm ERR! at Request.self.callback (/usr/local/Cellar/node/0.10.22/lib/node_modules/npm/node_modules/request/request.js:129:22)
npm ERR! at Request.EventEmitter.emit (events.js:98:17)
npm ERR! at Request. (/usr/local/Cellar/node/0.10.22/lib/node_modules/npm/node_modules/request/request.js:873:14)
npm ERR! at Request.EventEmitter.emit (events.js:117:20)
npm ERR! at IncomingMessage. (/usr/local/Cellar/node/0.10.22/lib/node_modules/npm/node_modules/request/request.js:824: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! npm-@googlegroups.com

any suggestion?

@BernhardBezdek

After an Update to 0.10.24 I have this error again.
I already remove my .pm Folder inside my Users folder.

My log output is very similar to the previous posts.

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'adduser' ]
2 info using npm@1.3.21
3 info using node@v0.10.24
4 error Error: default value must be string or number
4 error at read (/usr/local/lib/node_modules/npm/node_modules/read/lib/read.js:15:11)
4 error at readEmail (/usr/local/lib/node_modules/npm/lib/adduser.js:96:3)
4 error at loop (/usr/local/lib/node_modules/npm/lib/adduser.js:33:20)
4 error at /usr/local/lib/node_modules/npm/lib/adduser.js:89:5
4 error at Interface.onLine (/usr/local/lib/node_modules/npm/node_modules/read/lib/read.js:111:5)
4 error at Interface.EventEmitter.emit (events.js:95:17)
4 error at Interface._onLine (readline.js:202:10)
4 error at Interface._line (readline.js:531:8)
4 error at Interface._ttyWrite (readline.js:760:14)
4 error at ReadStream.onkeypress (readline.js:99:10)
5 error If you need help, you may report this entire log,
5 error including the npm and node versions, at:
5 error http://github.com/isaacs/npm/issues
6 error System Darwin 13.0.0
7 error command "node" "/usr/local/bin/npm" "adduser"
8 error cwd /Users/bernhardbezdek/Desktop/ihave.to
9 error node -v v0.10.24
10 error npm -v 1.3.21
11 verbose exit [ 1, true ]

@BernhardBezdek

So solved the problem right know on OSX.

create /Users/your_username/.npmrc and write your accounts email inside.

email = foo@bar.com

Then it was working on my machine.

Original answear from @howardabrams
#4363 (comment)

@jfpsf

I've solved my problem. In my case, it was because my NPM username was different than my Mac OSX user name. The solution was to give my Mac OSX user name when prompted by adducer instead of my NPM one. Alternatively, you can do what Bernhard did above, and create a separate .npmrc file in a directory under users with your NPM user name.

@evil-shrike

I've updated to node@0.10.24 and npm@1.321 and still having the issue :(

@jfpsf

evil-shrike did you see my note above. If your unix (or Mac OS) account name is different than your NPM user name, you need to type in your unix user name when prompted by nom adducer. Then, it will work.

@evil-shrike

@jfpsf Yeah, but I'm on Windows. My OS account name is almost the same as npm's one except case ('shrike' vs 'Shrike'). npm requires account name in lowercase, so I have no choice.

p.s. Anyway I can't understand how OS account name relates to npm's account name - it's weird.

@MotaLi

Try these way:
1, update npm to latest version.
2, register a account on https://github.com/, then npm config set your-email-address@gmail.com.
your-email-address@gmail.com is your email that used to register account on https://github.com/.

@yanyiwu

@BernhardBezdek
thank you, it works for me too.

@smikes

@evil-shrike, Is this still a problem for you?

Can you reproduce this error with a current npm? Latest is 2.18 -- quite a bit has changed since 1.3.21.

To update npm on Windows, follow the instructions here: https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

We are trying to clean up older npm issues, so if we don't hear back from you within a week, we will close this issue. (Don't worry -- you can always come back again and re-open it!)

Thanks!

@evil-shrike

@smikes yeah, it's still not working for me.
I've updated npm to 2.1.9

But now it tells me that username/password are incorrect. But they are correct of cause as I can login with them on npmjs.org.

@othiym23 othiym23 added bug support and removed bug labels
@othiym23
Owner

@evil-shrike, what if you remove $HOME/.npmrc and try to log in again from scratch? I take it you've already reset your password at least once at https://www.npmjs.org/forgot?

@smikes

We resolved @evil-shrike 's problems in follow-on issue #6788, so everyone here is now resolved, I think. This case is OK to close.

@othiym23
Owner

Closing as resolved, then!

@othiym23 othiym23 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.