npm config
and npm, registry, proxy and more
Syntax
npm config <set|get|list|delete> [key] [value]
Parameters
| Parameters | Description | Examples | Level |
|---|---|---|---|
set <key> <value> |
npm config set registry https://registry.npmmirror.com |
Common | |
get <key> |
npm config get registry |
Common | |
list |
npm config list |
Common | |
delete <key> |
npm config delete proxy |
Common |
Examples
npm config set registry https://registry.npmmirror.com
npm config set registry https://registry.npmjs.org
registry
npm config get registry
npm config set proxy http://127.0.0.1:7890
Common Errors
npm ERR! network request failed, registry
Tips
- DeveloperRecommended npmmirror()
- .npmrc
- nrm registry