npm Command Reference

npm Common command Quick Reference, Ctrl+F

npm init -y package.json
npm init vite@latest Vite
npx create-react-app my-app React
npx create-next-app@latest Next.js

npm install
npm install <pkg>
npm install -D <pkg>
npm install -g <pkg>
npm uninstall <pkg>
npm update New
npm ci (CI )
npm prune

npm run <script>
npm start start
npm test
npm run build
npx <cmd> command()

npm ls --depth=0
npm outdated New
npm info <pkg>
npm search <keyword>
npm run

npm login npm
npm whoami
npm version patch
npm version minor
npm publish
npm pack --dry-run

npm config set registry <url>
npm config get registry
npm cache clean --force
npm config list