NPM is Node Package Manager, provides two functionalities:
- Online repositories for node.js packages/modules which are searchable on search.nodejs.org
- Command line utility to install Node.js packages, do version management and dependency management of Node.js packages.
To check npm version
npm --version
To create package.json
npm init
To install package
npm install <package name>
To update package
npm update <package name>
To install a package and any packages that it depends on
npm install
To uninstall package(s)
npm uninstall <package name>
To run script
npm run <script name>