Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I update an NPM module that I published?

Tags:

npm

module

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?

like image 732
ThomasReggi Avatar asked Feb 24 '13 20:02

ThomasReggi


People also ask

Do npm packages update automatically?

Run npm update to automatically update my packages to the latest versions From docs: > This command will update all the packages listed to the latest version (specified by the tag config), respecting the semver constraints of both your package and its dependencies (if they also require the same package).

What does publishing to npm mean?

Description. Publishes a package to the registry so that it can be installed by name. By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a scope in the name, combined with a scope-configured registry (see package. json ).


1 Answers

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.

like image 194
SLaks Avatar answered Nov 21 '22 13:11

SLaks