After entering billing info and re-login my npm client I tried publishing a new private module.
I set "private": "true"
on package.json
and gave a name using the scope thing like @myusername/mymodule
. Then I got an error message on npm publish
saying that I have to remove "private": "true"
to publish my module! What am I doing wrong?
Should I remove the private atribute and trust that the simple fact that I gave it a scoped name will make it private by default?
INFO: npm v2.7.6
"private": true
is completely different from private packages. From docs.npmjs.com:
If you set
"private": true
in your package.json, then npm will refuse to publish it. This is a way to prevent accidental publication…
I don’t think that’s what you’re looking for.
Starting in [email protected]
, if you are a paid user, you can publish private packages to the npm registry.
"name": "@username/module-name"
.--access=public
option.Should I remove the private atribute and trust that the simple fact that I gave it a scoped name will make it private by default?
It looks like you should be safe doing that according to this page!
Specifically:
All scoped packages default to restricted access. This ensures that you don't make something public by accident. You can change this on the access page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With