node.js - 安装express时出错

标签 node.js express npm

安装 Express 时出现以下错误。

我使用的是 Node 0.10.17 和 npm 1.3.8

我尝试了npm install express

看起来像是版本问题。推荐哪个版本?

npm ERR! Error: shasum check failed for C:\Users\GAURAV~1\AppData\Local\Temp\npm
-5800-RRPyptXX\1384367930969-0.5868753655813634\tmp.tgz
npm ERR! Expected: a567c2af000ad22dc8f2a653d91978ae1f5316f4
npm ERR! Actual:   4077b08504e56e904990e4cc29e248752fbf211f
npm ERR!     at C:\Program Files\nodejs\node_modules\npm\node_modules\sha\index.
js:38:8
npm ERR!     at ReadStream.<anonymous> (C:\Program Files\nodejs\node_modules\npm
\node_modules\sha\index.js:85:7)
npm ERR!     at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "express"
npm ERR! cwd D:\Project\websocket
npm ERR! node -v v0.10.17
npm ERR! npm -v 1.3.8
npm http GET https://registry.npmjs.org/bytes/0.2.1
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/uid2/0.0.3
npm http 304 https://registry.npmjs.org/bytes/0.2.1
npm http 304 https://registry.npmjs.org/uid2/0.0.3
npm http 304 https://registry.npmjs.org/mime
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     D:\Project\websocket\npm-debug.log
npm ERR! not ok code 0

有什么解决办法吗?

最佳答案

npmjs.org 网站上周和今天都出现了可靠性问题。正如 Jeremy 评论的那样,这可能只是 npm 无法正确下载 Express 包。等待一段时间,让他们重新启动并运行,然后重试。

关于node.js - 安装express时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19961921/

相关文章:

npm - bower 安装挂起

node.js - Express.js 使用 Router vs App.use 路由的好处?

javascript - 获取语​​音 channel 中的用户数

node.js - 如何在 Express 4 中使用 Node Inspector( Node 调试)?

node.js - TypeError : req. next is not a function

sql - 根据列值过滤或分离 SQL 查询

javascript - NPM 包模块中的 Jest 单元测试失败并显示 `ReferenceError`

javascript - 错误 : Cannot find module '../lib/cli'

javascript - 如何访问 gulp-gray-matter 插件创建的数据对象(使用 nunjucks 编译 html 文件时)

javascript - Uncaught Error : [HMR] Hot Module Replacement is disabled