Update npm package

author

Devmnj • Sat Oct 08 2022

0 min read

We can't publish a package twice to the npm, registry will check the package's version. Literally we can't update existing package, it will remain same.

How do we publish changes

Since packages need to be updated, we can use different version for new features, it also a good practice that the older version remain same, since there can be apps developed using those versions.

To publish a new version of the existing package, change the version key in the package.json (at the root of the project) and go on publish

Source code

npm adduser (optional)
npm publish 
or
npm publish --access=public
Tags : nextjs