美文网首页
nrm 报[TypeError [ERR_INVALID_ARG

nrm 报[TypeError [ERR_INVALID_ARG

作者: 亦亦嘟嘟 | 来源:发表于2021-03-15 23:05 被阅读0次
    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');
    

    相关文章

      网友评论

          本文标题:nrm 报[TypeError [ERR_INVALID_ARG

          本文链接:https://www.haomeiwen.com/subject/cialcltx.html