我正在尝试在系统中安装npm,但出现以下错误:
npm错误!找不到模块“ npm-registry-fetch”
在谷歌搜索之后,我发现该软件包旨在替代旧的npm-registry-client,但我尚未找到任何解决方案。
一些信息:
npm -v: 6.4.1
node -v: 9.11.1
我什至尝试升级到最新版本的节点,但仍然出现相同的错误
日志文件:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\atcs\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'i',
1 verbose cli 'npm-registry-fetch' ]
2 info using npm@6.4.1
3 info using node@v9.11.1
4 verbose config Skipping project config: C:\Users\atcs/.npmrc. (matches userconfig)
5 verbose stack Error: Cannot find module 'npm-registry-fetch'
5 verbose stack at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
5 verbose stack at Function.Module._load (internal/modules/cjs/loader.js:475:25)
5 verbose stack at Module.require (internal/modules/cjs/loader.js:598:17)
5 verbose stack at require (internal/modules/cjs/helpers.js:11:18)
5 verbose stack at Object.<anonymous> (C:\Users\atcs\AppData\Roaming\npm\node_modules\npm\lib\install\audit.js:17:23)
5 verbose stack at Module._compile (internal/modules/cjs/loader.js:654:30)
5 verbose stack at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
5 verbose stack at Module.load (internal/modules/cjs/loader.js:566:32)
5 verbose stack at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
5 verbose stack at Function.Module._load (internal/modules/cjs/loader.js:498:3)
5 verbose stack at Module.require (internal/modules/cjs/loader.js:598:17)
5 verbose stack at require (internal/modules/cjs/helpers.js:11:18)
5 verbose stack at Object.<anonymous> (C:\Users\atcs\AppData\Roaming\npm\node_modules\npm\lib\install.js:140:13)
5 verbose stack at Module._compile (internal/modules/cjs/loader.js:654:30)
5 verbose stack at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
5 verbose stack at Module.load (internal/modules/cjs/loader.js:566:32)
6 verbose cwd C:\Users\atcs
7 verbose Windows_NT 10.0.16299
8 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\atcs\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "i" "npm-registry-fetch"
9 verbose node v9.11.1
10 verbose npm v6.4.1
11 error code MODULE_NOT_FOUND
12 error Cannot find module 'npm-registry-fetch'
13 verbose exit [ 1, true ]
在此先感谢您,继续编码;)