npm publish gives “unscoped packages cannot be private”

  • A+

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 


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