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.
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.
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.
Credit to Wes Bos here: https://twitter.com/wesbos/status/1067822624561143809
Logging into npm with npm login
resolved this for me.