好些年不碰開發,變化很大,安裝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
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/257119.html
標籤:其他
上一篇:Webpack 構建優化總結
