cli icon indicating copy to clipboard operation
cli copied to clipboard

$ npm login fails with: That email has already been registered.

Open blaasvaer opened this issue 6 years ago • 10 comments

What / Why

I'm trying to login to npm to update a package.

n/a

When

All the time

Where

In the Terminal on Mac OS X

How

Current Behavior

When doing: $ npm login Get prompted for username ... type it in. Get prompted for password ... type it in. Get prompted for e-mail ... type it in.

Get: 400 Bad Request - PUT https://registry.npmjs.org/-/user/org.couchdb.user:blaasvaer - That email has already been registered.

Steps to Reproduce

See above steps

Expected Behavior

Well, to get logged in and be able to do $ npm publish

Who

Erhm, me?

Why does npm make me think I'm trying to sign UP instead of IN?

blaasvaer avatar Mar 19 '20 11:03 blaasvaer

the CLI only has one action, "sign up or sign in".

http://npmjs.com/~blaasvaer is an org, not a user, so you can't log in as it. Perhaps you're trying to log in as https://www.npmjs.com/~samblaasvaer ?

ljharb avatar Mar 19 '20 16:03 ljharb

I have the same problem

vufrontend avatar Apr 16 '20 05:04 vufrontend

You won't be able to login with your original npm username anymore if you converted your npm user to an npm organization. During the process of the conversion, npm should have asked you to create a new username. This is the new username that you will have to log in with.

⭐ If you forgot the new username, you can find it on https://www.npmjs.com/ by logging in with your email.

⭐ If you don't know the new username's password, use this form to create a new password.

hzhu avatar May 03 '20 03:05 hzhu

If in fact you are using a user not an org, change your password seems to fix it.

simesy avatar Oct 08 '20 06:10 simesy

Use > npm adduser instead of > npm login

hend-elsahli avatar Jan 05 '22 08:01 hend-elsahli

Those are the same.

ljharb avatar Jan 05 '22 15:01 ljharb

For some reason, "after resetting password "... npm adduser worked ... and npm login didn't

hend-elsahli avatar Jan 05 '22 16:01 hend-elsahli

One is an alias for the other. Maybe it was just running it twice.

ljharb avatar Jan 05 '22 16:01 ljharb

One is an alias for the other. Maybe it was just running it twice.

Yes ... it could be it

hend-elsahli avatar Jan 05 '22 17:01 hend-elsahli

You won't be able to login with your original npm username anymore if you converted your npm user to an npm organization. During the process of the conversion, npm should have asked you to create a new username. This is the new username that you will have to log in with.

star If you forgot the new username, you can find it on https://www.npmjs.com/ by logging in with your email.

star If you don't know the new username's password, use this form to create a new password.

This was my case, thank you!!

MouraVocal avatar Oct 24 '22 18:10 MouraVocal