npm
Original:🇺🇸 English
Translated
npm Node.js package manager and registry. Use for JavaScript dependencies.
11installs
Sourceg1joshi/agent-skills
Added on
NPX Install
npx skill4agent add g1joshi/agent-skills npmTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →npm
npm is the default package manager for Node.js. v11 (2025) introduces strict publishing rules and caching improvements.
npxWhen to Use
- Default: It comes with Node. Zero friction.
- Compatibility: The standard is supported everywhere.
package-lock.json - Publishing: is the canonical way to share JS code.
npm publish
Quick Start
bash
npm init -y
npm install lodash
npm install --save-dev jest
# Monorepo
npm init -w packages/my-libCore Concepts
package.json
Manifest file. Scripts, dependencies, metadata.
package-lock.json
Locks dependency tree for reproducible builds. Commit this.
Workspaces
Native monorepo support.
installs dependencies for root and all nested packages.
npm installBest Practices (2025)
Do:
- Use : For CI/CD pipelines. Faster and strict (fails if lockfile doesn't match).
npm ci - Audit: to find vulnerabilities.
npm audit - Use Scopes: to avoid name collisions.
@my-org/my-pkg
Don't:
- Don't mix managers: Don't use in a repo with
yarn.package-lock.json