2013-05-13 55 views
1

我試圖安裝快遞使用節點包管理器,我得到下面的錯誤。這是在以管理員身份運行cmd的Windows 7 x64上。有任何幫助?節點包管理器安裝錯誤與快遞

Microsoft Windows [Version 6.1.7601] 
Copyright (c) 2009 Microsoft Corporation. All rights reserved. 

C:\>npm install express -g 
npm http GET https://registry.npmjs.org/express 
npm http GET https://registry.npmjs.org/express 
npm http GET https://registry.npmjs.org/express 
npm ERR! Error: SELF_SIGNED_CERT_IN_CHAIN 
npm ERR!  at SecurePair.<anonymous> (tls.js:1283:32) 
npm ERR!  at SecurePair.EventEmitter.emit (events.js:92:17) 
npm ERR!  at SecurePair.maybeInitFinished (tls.js:896:10) 
npm ERR!  at CleartextStream.read [as _read] (tls.js:430:15) 
npm ERR!  at CleartextStream.Readable.read (_stream_readable.js:304:10) 
npm ERR!  at EncryptedStream.write [as _write] (tls.js:344:25) 
npm ERR!  at doWrite (_stream_writable.js:211:10) 
npm ERR!  at writeOrBuffer (_stream_writable.js:201:5) 
npm ERR!  at EncryptedStream.Writable.write (_stream_writable.js:172:11) 
npm ERR!  at write (_stream_readable.js:557:24) 
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!  <[email protected]> 

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" "-g" 
npm ERR! cwd C:\ 
npm ERR! node -v v0.10.5 
npm ERR! npm -v 1.2.18 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  C:\npm-debug.log 
npm ERR! not ok code 0 

我可以連接到http://registry.npmjs.org/express在Chrome返回JSON

+0

爲SELF_SIGNED_CERT_IN_CHAIN錯誤檢查http://stackoverflow.com/questions/9626990/receiving-error-error-ssl-error-self-signed-cert-in-chain-while-using-npm – hcpl 2014-02-28 12:51:21

回答

1

如果您連接到https://registry.npmjs.org/你會發現,Chrome的給你,因爲registry.npmjs.org SSL錯誤是服務了自簽名的SSL證書。 registry.npmjs.org現在使用適當的CA簽名證書。

有兩種可能性:

  • 你NPM配置被搞砸了。刪除所有與npm相關的並重新安裝。
  • 如果您處於具有攔截HTTPS代理的環境中,可能會破壞npm。與您的網絡管理員聯繫。
+2

我相信這是正確的,網絡部分立即在家中使用最新版本......我將在工作時看到它更多,並看看網絡管理員是否看到相同的故障。 – abc123 2013-05-14 03:47:33

+0

問題解決! – abc123 2013-05-14 16:10:36

+0

我已經升級了我的節點和npm。我似乎有4個證書。但我仍然得到錯誤。還有什麼想法? – 2014-02-28 02:07:05