Back to CLI Index

npm Package Manager

npm command line guide

Node Package Manager command guidelines and dependency workflows. Manage modules and bundle assets.

Interactive BASH Console Sandbox
npm-shell v1.2
Initializing cluster shell connection... [SUCCESS]
Type help to inspect all simulator diagnostics.
$ npm

Standard Commands Included

11 commands mapped
npm install Dependencies

Install all dependencies mapped inside package.json locally.

npm install express
npm run dev Builds

Execute standard local development hot-reload build scripts.

npm run dev
npm run build Builds

Compile production bundle assets according to bundler configuration.

npm run build
npm publish Publishing

Publish a library package to the npm registry repository.

npm publish --access public
npm update Dependencies

Update dependency packages in repository to match package.json constraints.

npm update lodash
npm uninstall Dependencies

Remove package from local node_modules directory and package.json schema.

npm uninstall bootstrap
npm init Setup

Initialize a package.json descriptor schema for a new Node.js app.

npm init -y
npm list Dependencies

Inspect tree structures of local dependencies in package.

npm list --depth=0
npm prune Utility

Prune redundant local node packages from directories.

npm prune
npm audit Utility

Inspect package list for security vulnerability warnings.

npm audit fix
npm doctor Setup

Verify local environment configurations and cache folders.

npm doctor