[NodeJS] – How to update/install an specific dependence?

Use the following command.

npm install --save --save-exact @

E.g ( npm install --save --save-exact browserify@12.0.0 )

Notes:

  • If the dependence is a development dependence use --save-devinstead of --save.
  • This command should automatically update the “shrinkwrap.json” file which is a lock file for the defined dependencies in the application, however, if it doesn’t happen then remove the “node_modules” directory and the `shrinkwrap.json` file and after that run “npm install” and “npm shrinkwrap” to re-generated this file.

For further information see the NodeJS install documentation and npm-shrinkwrap documentation

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s