p:: Node f:: yarn, pnpm, npkill
Common Commands
| Command | Description |
|---|---|
npm install | Install all dependencies from package.json |
npm install <pkg> | Install a package and save to dependencies |
npm install -D <pkg> | Install as devDependency |
npm run <script> | Run a script defined in package.json |
npm update | Update packages to latest compatible versions |
npm publish | Publish a package to the registry |
Alternatives
- yarn — faster installs, workspaces
- pnpm — disk-efficient, hard links
- Bun — all-in-one runtime with built-in package manager