npm/pnpm/yarn
Config Commands
Configure npm with .npmrc files, registry settings, and authentication tokens. Manage global and per-project configuration for custom registries and scopes.
7 commands
Pro Tips
Use 'npm config list' to see all active configuration. Add '--long' for the full list with defaults.
Set a custom registry per scope: 'npm config set @myorg:registry https://npm.myorg.com'.
Create a project .npmrc for team-wide settings like 'save-exact=true' or 'engine-strict=true'.
Common Mistakes
Never commit .npmrc files with auth tokens. Use 'npm token create' and set tokens via environment variables in CI.
Global .npmrc (~/.npmrc) overrides project .npmrc for some settings. Be aware of the precedence chain.