How do I update an NPM module that I published?

ThomasReggi picture ThomasReggi · Feb 24, 2013 · Viewed 30.7k times · Source

I created a NPM module and I published it at version 0.0.1

I made some changes and pushed those to github, and I would like it so that when one uses npm install myModule the new version is used.

How do I tell NPM that there is a version 0.0.2?

Answer

SLaks picture SLaks · Feb 24, 2013

Change the version in your package.json or use npm version <new-version>.

After changing the version number in your package.json, you can run npm publish to publish the new version to NPM.

npm install will install the latest version in the NPM repository.