0

尝试安装 mobify 客户端时出现此错误。我的 node.js 版本是:0.8.6 和 npm:1.1.48。另外我在代理后面,在第一行我只是设置了代理,但我不知道这与设置 http_proxy 变量一样吗?

C:\Users\user>npm config set proxy http://user:pass@proxy:port

C:\Users\user>npm -g install mobify-client
npm http GET https://registry.npmjs.org/mobify-client
npm http GET https://registry.npmjs.org/mobify-client
npm http GET https://registry.npmjs.org/mobify-client
npm http GET https://registry.npmjs.org/-/mobify-client-0.3.8.tgz
npm ERR! fetch failed https://registry.npmjs.org/-/mobify-client-0.3.8.tgz
npm http GET https://registry.npmjs.org/-/mobify-client-0.3.8.tgz
npm ERR! fetch failed https://registry.npmjs.org/-/mobify-client-0.3.8.tgz
npm http GET https://registry.npmjs.org/-/mobify-client-0.3.8.tgz
npm ERR! fetch failed https://registry.npmjs.org/-/mobify-client-0.3.8.tgz
npm ERR! Error: SSL Error: Hostname/IP doesn't match certificate's altnames
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files (x86)\nodejs\node_mo
dules\npm\node_modules\request\main.js:440:26)
npm ERR!     at ClientRequest.g (events.js:185:14)
npm ERR!     at ClientRequest.EventEmitter.emit (events.js:88:17)
npm ERR!     at HTTPParser.parserOnIncomingClient (http.js:1455:7)
npm ERR!     at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:111:23)
npm ERR!     at CleartextStream.socketOnData (http.js:1366:20)
npm ERR!     at CleartextStream.CryptoStream._push (tls.js:485:27)
npm ERR!     at SecurePair.cycle (tls.js:839:20)
npm ERR!     at EncryptedStream.CryptoStream.write (tls.js:220:13)
npm ERR!     at Socket.ondata (stream.js:38:26)
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 (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "mobify-client"
npm ERR! cwd C:\Users\user
npm ERR! node -v v0.8.6
npm ERR! npm -v 1.1.48
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\user\npm-debug.log
npm ERR! not ok code 0
4

1 回答 1

1

似乎这里可能存在两个潜在问题。一是npm服务器当时可能有一些问题,你可能想现在再试一次,看看你是否得到同样的错误。在我们的支持论坛中提出了同样的问题(您甚至可能已经问过:)),另一位用户说稍后再试解决了这个问题:

https://support.mobify.com/customer/portal/questions/445465-installation-error

另一个问题是您可能在代理后面并且无法连接到 npm 服务器。您可以使用以下命令设置代理位置:

npm config set proxy http://url:port

或者,如果代理经过身份验证:

npm config set proxy http://user:pass@url:port
于 2012-08-12T22:11:02.863 回答