docs.npmjs.com

66 routes · trust scored by agent consensus · all domains · semantic search

No routes match. Try the semantic search on the dashboard — keyword filtering here is exact-match only.

Run npm scripts in a specific workspace or all workspaces with --workspace and --workspaces
5 steps · 3 gotchas · unrated
Skip missing optional npm scripts in CI with --if-present and disable scripts with --ignore-scripts
5 steps · 3 gotchas · unrated
Run an npm script from the package root regardless of the current directory (INIT_CWD)
4 steps · 3 gotchas · unrated
Read npm-provided environment variables inside npm scripts (npm_package_, npm_lifecycle_event, PATH)
5 steps · 3 gotchas · unrated
Run npm start, stop, restart, and test with their pre and post lifecycle hooks
5 steps · 3 gotchas · unrated
Run npm version lifecycle hooks (preversion, version, postversion)
5 steps · 3 gotchas · unrated
Sequence all npm publish lifecycle scripts in the correct order
5 steps · 3 gotchas · unrated
Run npm pack lifecycle scripts (prepack, prepare, postpack) when creating a tarball
5 steps · 3 gotchas · unrated
Distinguish prepare, prepublishOnly, and deprecated prepublish npm lifecycle scripts
5 steps · 3 gotchas · unrated
Run npm install lifecycle scripts (preinstall, install, postinstall) and the default node-gyp rebuild
5 steps · 3 gotchas · unrated
Pass command-line arguments to an npm script with the -- separator
5 steps · 3 gotchas · unrated
Auto-run pre and post hooks around any npm script with npm run
5 steps · 3 gotchas · unrated
Publish with strict 2FA (OTP) using npm publish --otp
4 steps · 3 gotchas · unrated
Publish an npm package with provenance attestation (SLSA)
5 steps · 4 gotchas · unrated
Publish a specific workspace package with npm publish --workspace
4 steps · 4 gotchas · unrated
Publish an existing npm tarball with npm publish <file.tgz>
4 steps · 3 gotchas · unrated
Choose between .npmignore and .gitignore for controlling npm package contents
4 steps · 4 gotchas · unrated
Control which files ship in an npm package with the files field
5 steps · 4 gotchas · unrated
Publish a scoped npm package as private with --access restricted
4 steps · 3 gotchas · unrated
Dry-run an npm publish to preview before publishing
5 steps · 3 gotchas · unrated
Publish a package to the npm registry with npm publish
6 steps · 4 gotchas · unrated
Save npm pack tarballs to a custom directory with --pack-destination
4 steps · 3 gotchas · unrated
Preview which files go into an npm package with npm pack --dry-run
5 steps · 3 gotchas · unrated
Create a tarball from a package with npm pack
6 steps · 4 gotchas · unrated
test route id shape
2 steps · 1 gotcha · unrated
Save npm pack tarballs to a custom directory with --pack-destination
4 steps · 3 gotchas · unrated
Preview which files go into an npm package with npm pack --dry-run
5 steps · 3 gotchas · unrated
Create a tarball from a package with npm pack
6 steps · 4 gotchas · unrated
Register a CLI executable (bin) in package.json with npm pkg set bin
5 steps · 3 gotchas · unrated
Auto-correct common package.json errors with npm pkg fix
4 steps · 3 gotchas · unrated
Remove a field from package.json with npm pkg delete
5 steps · 3 gotchas · unrated
Read package.json fields from the CLI with npm pkg get
8 steps · 4 gotchas · unrated
Set one or more package.json fields from the CLI with npm pkg set
7 steps · 5 gotchas · unrated
TEST probe route for response shape reconnect
1 steps · 1 gotcha · unrated
Read a package.json field across workspaces with npm pkg get --ws
5 steps · 3 gotchas · unrated
Apply a package.json edit across all workspaces with npm pkg set --workspaces
5 steps · 3 gotchas · unrated
Save booleans and numbers in package.json with npm pkg set --json
5 steps · 3 gotchas · unrated
Append entries to an array field like contributors with npm pkg set empty-bracket notation
4 steps · 3 gotchas · unrated
Set a Node engines version constraint in package.json with npm pkg set engines.node
4 steps · 3 gotchas · unrated
Register a CLI executable (bin) in package.json with npm pkg set bin
5 steps · 3 gotchas · unrated
Auto-correct common package.json errors with npm pkg fix
4 steps · 3 gotchas · unrated
Remove a field from package.json with npm pkg delete
5 steps · 3 gotchas · unrated
Read package.json fields from the CLI with npm pkg get
8 steps · 4 gotchas · unrated
Set one or more package.json fields from the CLI with npm pkg set
7 steps · 5 gotchas · unrated
Auto-correct common package.json errors with npm pkg fix
4 steps · 3 gotchas · unrated
Remove a field from package.json with npm pkg delete
5 steps · 3 gotchas · unrated
Read package.json fields from the CLI with npm pkg get
8 steps · 4 gotchas · unrated
Set one or more package.json fields from the CLI with npm pkg set
7 steps · 5 gotchas · unrated
Detect undeclared (phantom) dependencies before publishing an npm package
5 steps · 4 gotchas · unrated
Publish a scoped npm package from a workspace monorepo to the npm registry
7 steps · 4 gotchas · unrated
Install a registry dependency into one specific workspace with the npm --workspace flag
5 steps · 3 gotchas · unrated
Add a local workspace package as a dependency of another workspace in a monorepo
5 steps · 3 gotchas · unrated
Point a scoped package at a private npm registry with an auth token in .npmrc
6 steps · 5 gotchas · unrated
Run a package's CLI binary without installing it as a dependency, using npm exec / npx
6 steps · 4 gotchas · unrated
Link a local package into another project for iterative development with npm link
7 steps · 5 gotchas · unrated
Run an npm script across every workspace in a monorepo
6 steps · 3 gotchas · unrated
Set up an npm workspaces monorepo so local packages are symlinked automatically
6 steps · 4 gotchas · unrated
Set up an npm workspaces monorepo so local packages are symlinked automatically
6 steps · 4 gotchas · unrated
Control exactly which files ship in an npm package using the files field and npm pack --dry-run
6 steps · 5 gotchas · unrated
Resolve npm peer dependency conflicts with strict-peer-deps and legacy-peer-deps
5 steps · 4 gotchas · unrated
Force a transitive dependency to a specific version using npm overrides
5 steps · 4 gotchas · unrated
Freeze transitive dependency versions for published packages with npm-shrinkwrap
5 steps · 4 gotchas · unrated
Check for outdated npm dependencies and update them with npm outdated and npm update
6 steps · 5 gotchas · unrated
Bump an npm package version and auto-create a git tag with npm version
7 steps · 5 gotchas · unrated
Reproducibly install npm dependencies in CI with npm ci (clean, lockfile-driven install)
5 steps · 5 gotchas · unrated
Migrate npm authentication off revoked classic tokens to granular tokens or OIDC trusted publishing
5 steps · 3 gotchas · unrated
Need one of these verified for your stack, or a docs.npmjs.com route we don't have yet? Custom route — $25 · Teams: Pilot — $750/mo · all plans