Node Package Manager
What is NPM??
-
npm is a package manager for Javascript. It is like an central online database where open source and private packages are available.
-
The developers can download the package using npm cli(Command line interface)
-
NPM is installed when you are installing node. So, If you already have node in your system then NPM should be available.
-
You can check the version of npm like this “npm -v”
Install a package Using NPM
npm install <your_package_name>This will install your package in ./node_modules/your_package_name
npm listInitialize a project with NPM
Install a package Using NPM
npm install <your_package_name>This will install your package in ./node_modules/your_package_name
npm listThis command will ask some information regarding your project like name of the project, license information(MIT or BSD), author name etc.,
npm initIf you want to install a package globally, Then you can use this command below,
npm install <package_name> -gIf installed globally, based on the OS the packages are installed in specific folders,
ON UNIX:
/usr/local/lib/node or /usr/local/lib/node_modules
ON Windows:
%USERPROFILE%\AppData\Roaming\npm\node_modules
QUICK RECAP
Node Package Manager
By hentry martin
Node Package Manager
- 258