npm publish gives “unscoped packages cannot be private”

  • A+
Category:Languages

I want to publish a normal, public package to npm. When I do npm publish I get:

npm ERR! publish Failed PUT 400 npm ERR! code E400 npm ERR! unscoped packages cannot be private : my-package 

 


It appears that (at least the first time, or as of November 2018), you have to do:

npm publish --access public 

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: