Failing to login from PowerShell - npm Err! code EAUTHIP, Unable to authenticate, need: Basic


(Ben Carp) #1

What I Wanted to Do

from Power Shell I’m trying to login to npm.

What Happened Instead

After typing my username, password and email I get this error.

On this computer I haven’t logged in from Power Shell to npm before.
I can login from the browser to the npmjs website.
I couldn’t find relevant info about this error.

Reproduction Steps

On a windows 10 computer open PowerShell. type npm login. Enter the correct username, password and email.


I can login from the browser to the npmjs website.
I couldn’t find relevant info about this error.
According to the error message:

A complete log of this run can be found in:
npm ERR! C:\Users\carpb\AppData\Roaming\npm-cache_logs\2018-07-11T09_15_40_342Z-debug.log
But in my User folder there is no AppData folder.

Platform Info

npm -v prints: 5.6.0
node -v prints: v8.11.3
npm config get registry prints:
Windows 10

This issue was originally posted on Github, before the repository was archived:

(Kat Marchán) #2

This error literally means that you’re not allowed to perform this operation from your IP address. Do you have 2fa enabled? If so, I recommend you start by disabling it through the website. If that fails, could you put up a private gist with the output of npm run env and link it to me in a private message? There might be some env vars that are making the login confused.

If none of that works, you should send an email to because something’s going on with your account specifically and they’ll be able to resolve that for you. I’ll check in with folks in the meantime.

(Ben Carp) #3

Thanks Kat,
I just tried it, and unfortunately it failed. Will continue in private message.

(Ben Carp) #4

I tried to log in from Bash on Ubuntu on Windows (WSL) - same error occurs.
I just tried to log in from PowerShell on a different (recently installed) computer with the same end result.
2FA is not enabled, and I can log in from the browser.
This problem prevents me from updating a package, so please priorities it.

(Kat Marchán) #5

At this point, I think emailing is going to be the most helpful.

(Guido Barosio) #6

Fix for this:
npm install basic

(Ben Carp) #7

I just tried “npm install basic” command. Unfortunately it did not solve the problem.

(system) closed #8

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.