npm install 安装失败 ,大神给看看怎么回事!

$ npm install
npm WARN deprecated swig@1.4.2: This package is no longer maintained
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_moduleschokidarnode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\Node\node.exe" "D:\Node\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v7.4.0
npm ERR! npm v4.0.5

npm ERR! shasum check failed for C:UsersdellAppDataLocalTempnpm-3568-bffa2b65registry.npmjs.orgyargs-yargs-3.5.4.tgz
npm ERR! Expected: d8aff8f665e94c34bd259bdebd1bfaf0ddd35361
npm ERR! Actual: 46f08eb94d7130ad575d5d58ccb38510ae532d9a
npm ERR! From: https://registry.npmjs.org/ya...
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/is...

npm ERR! Please include the following file with any support request:
npm ERR! F:mydatahexonpm-debug.log

阅读 23.8k
5 个回答

我刚刚电脑在安装更新,然后报错了
之后重启了一下
莫名其妙就行了
不知道是不是和更新内容有关
Windows系统。。

#文件:
C:UsersdellAppDataLocalTempnpm-3568-bffa2b65registry.npmjs.orgyargs-yargs-3.5.4.tgz

#期望值
npm ERR! Expected: d8aff8f665e94c34bd259bdebd1bfaf0ddd35361  

#实际值
npm ERR! Actual: 46f08eb94d7130ad575d5d58ccb38510ae532d9a

文件MD5不一致,请重新下载文件或检查网络线路是否安全。

可以试试切换下你的NPM源。看是否能得到解决。
国内的NPM有CNPM和淘宝的NPM源比较稳定。
npm源切换和工具可参照站内贴 nrm工具的使用
或者是直接用命令切换

npm config set registry https://registry.npm.taobao.org

同样的问题!请问解决了吗?一定换成cnpm?

推荐问题
宣传栏