How do I update an NPM module that I published?

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.


Increase the version number and then run npm publish yourModule again - as described in the npm docs.

npm install yourModule will then install the latest version from the NPM registry.

I found the last answer a little misleading, sorry.