2

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.
jzyamateur
  • 113
  • 9

2 Answers2

2

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.

jzyamateur
  • 113
  • 9
0

Credit to Wes Bos here: https://twitter.com/wesbos/status/1067822624561143809

Logging into npm with npm login resolved this for me.

jolyonruss
  • 1,770
  • 2
  • 19
  • 34