npm and Node.js: manage JavaScript projects with Cerewro
npm (Node Package Manager) is Node.js's package manager and the world's largest, with over 2 million packages. From Cerewro you can manage the full Node.js project lifecycle: install dependencies, run scripts and resolve version conflicts.
Essential npm commands
| Action | Command |
|---|---|
| Install dependencies | npm install |
| Install package | npm install axios |
| Dev dependency | npm install --save-dev jest |
| Global install | npm install -g typescript |
| Clean install (from lock) | npm ci |
| Run script | npm run build |
| Update packages | npm update |
| Security audit | npm audit |
| List installed | npm list --depth=0 |
Manage Node.js versions with nvm-windows
winget install CoreyButler.NVMforWindows
nvm install 20.11.0
nvm use 20.11.0
nvm list
npm vs pnpm vs yarn: For large projects, consider
pnpm (up to 3x faster and uses 50% less disk space): npm install -g pnpm.