运行npm install -g vue-cli的时候 出现了

internal/modules/cjs/loader.js:583
throw err;
^

Error: Cannot find module ‘E:\node_modules\npm\bin\npm-cli.js’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
internal/modules/cjs/loader.js:583
throw err;
^

Error: Cannot find module ‘E:\node_modules\npm\bin\npm-cli.js’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

这样的报错

这样的报错是说明在node_modules下面找不到npm这个文件夹

这是正确的文件夹格式Cannot find module 'E:\node_modules\npm\bin\npm-cli.js'
我是把原先的这个文件夹卸载了 重新安装了就成功了

相关文章:

  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-08
猜你喜欢
  • 2021-09-23
  • 2021-07-14
  • 2021-12-09
  • 2021-10-23
  • 2021-10-28
  • 2021-11-06
相关资源
相似解决方案