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.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\nrm\cli.js:17:20)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
打开C:\Users\Administrator\AppData\Roaming\npm\node_modules\nrm\cli.js:17:20)
把
// const NRMRC = path.join(process.env.HOME, '.nrmrc');
改成下面这样既可
const NRMRC = path.join(process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'], '.nrmrc');
网友评论