1>下载nrm
npm i -g nrm(windows) sudo npm i -g nrm (linux和mac)
2>使用nrm管理npm源
nrm使用: Usage: cli [options] [command] Options: -V, --version output the version number -h, --help output usage information Commands: ls List all the registries (显示npm源列表,有*号代表当前使用的源) current Show current registry name (当前使用的npm源名称) use <registry> Change registry to registry (切换npm源) add <registry> <url> [home] Add one custom registry (添加npm源) del <registry> Delete one custom registry )(删除npm源) home <registry> [browser] Open the homepage of registry with optional browser(在浏览器中打开输入源(名称)的域名) test [registry] Show response time for specific or all registries help Print this help