Node Package Manager- Part II

Installing a Module :

You can download and install the latest version of a package:

$ npm install <package name>

First change your current directory to your application root directory and then type:

$ npm install express

This will create the node_modules directory if it doesn’t already exist and install the express module under it.

You can also choose which version of a specific module to install by specifying it like this:

$ npm install <package name>@<version spec>

$ npm install express@4.5.1


Uninstalling a Module :

To uninstall the package with the specified name.

$ npm uninstall <package name>

If you want to remove a globally installed package, you should use:

$ npm uninstall -g <package name> 


My Name is Dileep Singh, Noder, Javascript Lover & NoSql Developer, Fitness Freak, Love to travel new places, learning photography & Music Manic ♯ ♩ ♬

Posted in Node.Js Tagged with: