nrm:npm的镜像源管理工具,可以快速切换npm源。
全局安装nrm: npm install -g nrm
npm: https://www.npmjs.com/package/nrm
可能会报错,需要调整 https://blog.csdn.net/ayunnuo/article/details/113769504
查看源列表:nrm ls
切换源:nrm use 源名
增加源:nrm add 源名 源路径
删除源:nrm del 源名
测试源:nrm test 源名 需要切换成当前源才行
参考: https://www.jianshu.com/p/94d084ce6834
报错记录:
1.下图,应该是node版本和nrm版本不匹配造成的,调整nrm版本或者调整node版本
internal/validators.js:112throw new ERR_INVALID_ARG_TYPE(name, 'string', value);^[TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefinedat validateString (internal/validators.js:112:11)at Object.join (path.js:375:7)at Object.<anonymous> (D:\MyData\lianglh8\AppData\Roaming\nvm\v12.13.0\node_modules\nrm\cli.js:17:20)at Module._compile (internal/modules/cjs/loader.js:956:30)at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)at Module.load (internal/modules/cjs/loader.js:812:32)at Function.Module._load (internal/modules/cjs/loader.js:724:14)at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)at internal/main/run_main_module.js:17:11] {code: 'ERR_INVALID_ARG_TYPE'
