Converter Web ToolsConverter WebTools

npm Commands Cheat Sheet

This npm commands cheat sheet lists the Node.js package manager commands you use most — installing, removing and updating packages, and running scripts.

CommandWhat it does
npm initCreate package.json
npm init -yCreate with defaults
npm installInstall all dependencies
npm install <pkg>Add a package
npm install -D <pkg>Add a dev dependency
npm install -g <pkg>Install globally
npm uninstall <pkg>Remove a package
npm updateUpdate packages
npm run <script>Run a package.json script
npm startRun the start script
npm testRun tests
npm lsList installed packages
npx <pkg>Run a package without installing

Related tools & charts