我尝试在我下载的 angular 项目中安装 node_module,但出现此错误:
npm 错误!注册表错误解析json
然后我重新安装 npm 使用npm intall npm -g,然后当我尝试使用时出现npm install此错误:
(node:11252) UnhandledPromiseRejectionWarning: Unhandled promise
rejection (rejection id: 1): Error: ENOENT: no such file or directory, stat
'C:\Users\User\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-ec5da46c\angular\cdk.es5.js'
Run Code Online (Sandbox Code Playgroud)
调试日志:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install' ]
2 info using npm@5.4.2
3 info using node@v6.10.2
4 verbose npm-session ff5ce249dfe37f0e
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall spa@0.0.0
7 …Run Code Online (Sandbox Code Playgroud) npm ×1