安装 node 错误的配置环境变量之后使用 npm 报错,更换淘宝镜像 (cnpm)
node:internal/modules/cjs/loader:1147
throw err;
^
Error: Cannot find module ‘F:\ACodeTools\Node\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js’
at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
code: ‘MODULE_NOT_FOUND’,
requireStack: []
}
解决方法
删除此环境变量保留他下面的环境变量
正常使用