command branding logo

NPM

npm is a package manager for the JavaScript programming language maintained by npm, Inc. npm is the default package manager for the JavaScript runtime environment Node.js.

NPM Commands List

Command Name
Command
Command Description
Initialize Node Project
npm init
Initialize a local node project
List Npm packages
npm [command] help
Shows all the Npm packages installed locally in the project
List Global Npm Packages
npm list -g
Shows all the Npm packages installed globally on your system
Install All Npm packages
npm install
Checks for package.json file and installs all the packages in the package.json manifesto
Install Package Locally
npm install package_name
Installs npm package locally
Install Package Globally
npm install -g package_name
Installs npm package globally
Install Dev Package Locally
npm install package_name -D
Install Dev Dependancy Package Locally
Update Packages
npm update
Updates all the local specified package to the newest version
Update Package
npm update package_name
Updates the local specified package to the newest version
Uninstall Package
npm uninstall package_name
Uninstalls the specified package
Uninstall Global Package
npm uninstall package_name -g
Uninstalls the specified package globally
Launch Package
npm start
Start a package/project
Add User
npm adduser
Adds User to local Npm installation
Check Npm User
npm whoami
Gets the username of the account that is logged in
Publish package
npm publish
publishes the current project/package to npm registry.