我正在使用node v6.11.5和npm 3.10.10以及64位操作系统,在安装@angular/cli时出现以下错误:
C:\WINDOWS\system32>npm install -g @angular/cli
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "@angular/cli"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! shasum check failed for C:\Users\Shubham\AppData\Local\Temp\npm-6192-9e
acb63c\registry.npmjs.org\rxjs\-\rxjs-5.5.2.tgz
npm ERR! Expected: 28d403f0071121967f18ad665563255d54236ac3
npm ERR! Actual: c2b697120c7dc0e6728da0e7636b90e15723cc24
npm ERR! From: http://registry.npmjs.org/rxjs/-/rxjs-5.5.2.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\WINDOWS\system32\npm-debug.log
自昨晚以来,我一直在尝试解决这个问题,但每次都出现 shasum 检查失败的错误。我尝试了以下方法:
- 我将 npm 注册表配置为 http 和 https 两种方式,但都没有成功。
- 检查操作系统路径变量和 node 安装目录的路径,但没有发现问题。
- 尝试清理 npm、卸载和安装 angular/cli,但也没有成功。