无法在节点js中安装强大的

时间:2014-05-03 06:01:17

标签: javascript node.js

这可能听起来像是一个重复的问题,但是,相信我,它不是。我无法找到任何详细说明相同错误的来源以及如何解决这个错误:

C:\Users\admin\Desktop\nodejsfiles>npm install formidable
npm http GET https://registry.npmjs.org/formidable

npm ERR! Error: failed to fetch from registry: formidable
npm ERR!     at C:\Program Files\nodejs\node_modules\npm\lib\utils\npm-registry-
client\get.js:139:12
npm ERR!     at cb (C:\Program Files\nodejs\node_modules\npm\lib\utils\npm-regis
try-client\request.js:32:9)
npm ERR!     at Request._callback (C:\Program Files\nodejs\node_modules\npm\lib\
utils\npm-registry-client\request.js:137:18)
npm ERR!     at Request.callback (C:\Program Files\nodejs\node_modules\npm\node_
modules\request\main.js:109:22)
npm ERR!     at Request.<anonymous> (C:\Program Files\nodejs\node_modules\npm\no
de_modules\request\main.js:198:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\
npm\node_modules\request\main.js:356:14)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at HTTPParser.onIncoming (http.js:1258:11)
npm ERR!     at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! 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!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "formidable"
npm ERR! cwd C:\Users\admin\Desktop\nodejsfiles
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-3
npm ERR! message failed to fetch from registry: formidable
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\admin\Desktop\nodejsfiles\npm-debug.log
npm not ok

1 个答案:

答案 0 :(得分:4)

似乎有效

npm config set registry http://registry.npmjs.org/

引自"message failed to fetch from registry" while trying to install any module

无论如何,我建议您更新到nodejsnpm的最新版本。