Publishing a package
suggest changeFirst, configure the package as described in Setting up a package configuration. Then log in to npm.
If you already have an npm user:
npm login
If you do not have a user yet, npm adduser is the same command.
Check the logged-in account with:
npm whoami
When the package is ready:
npm publish
To publish again, bump version first. See Basic semantic versioning. npm rejects a version that is already in the registry.
{
"name": "package-name",
"version": "1.0.4"
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents