Reputation: 113
Trying to do npm install
for a package fails when any of the dependencies have a scoped public package e.g. @babel/generator
with a 401 Unauthorized
or something like
error Couldn't find package "@babel/generator" on the "npm" registry.
Upvotes: 2
Views: 1955
Reputation: 1840
Credit to Wes Bos here: https://twitter.com/wesbos/status/1067822624561143809
Logging into npm with npm login
resolved this for me.
Upvotes: 0
Reputation: 113
In my case,
I tried an npm logout
which might have cleared/reset local storage/session
info related to my npm login.
After that I am able to download/install publicly scoped packages normally.
Upvotes: 2