好些年不碰开发,变化很大,安装nrm的时候报错,如下:
internal/validators.js:120
throw new ERR_INVALID_ARG_TYPE(name, ‘string’, value);
^
[TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefined
at validateString (internal/validators.js:120:11)
at Object.join (path.js:375:7)
at Object. (D:\Program Files\nodejs\node_global\node_modules\nrm\cli.js:17:20)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
] {
code: ‘ERR_INVALID_ARG_TYPE’
}
根据多次尝试,版本问题,安装nrm是指定对应的版本。
参考链接:
https://www.bilibili.com/video/BV1VK4y1v7TK?from=search&seid=5216905125445101071