错误:使用npm install with node.js v0.12.4时,套接字挂起

安装快递邮件时遇到问题。

C:\mynode>npm install express-mail -g - > contextify@0.1.14 install C:\Users\Ivan\AppData\Roaming\npm\node_modules\expre ss-mail\node_modules\juice2\node_modules\jsdom\node_modules\contextify > node-gyp rebuild \ //After a few minutes C:\Users\Ivan\AppData\Roaming\npm\node_modules\express-mail\node_modules\juice2\ node_modules\jsdom\node_modules\contextify>if not defined npm_config_node_gyp (n ode "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modul es\node-gyp\bin\node-gyp.js" rebuild ) else (rebuild) gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: socket hang up gyp ERR! stack at createHangUpError (_http_client.js:215:15) gyp ERR! stack at Socket.socketOnEnd (_http_client.js:300:23) gyp ERR! stack at Socket.emit (events.js:129:20) gyp ERR! stack at _stream_readable.js:908:16 gyp ERR! stack at process._tickCallback (node.js:355:11) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu les\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\Ivan\AppData\Roaming\npm\node_modules\express-mail\node_mo dules\juice2\node_modules\jsdom\node_modules\contextify gyp ERR! node -v v0.12.4 gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs \\node_modules\\npm\\bin\\npm-cli.js" "--msvs_version=2013" "install" "express-m ail" "-g" npm ERR! node v0.12.4 npm ERR! npm v2.10.1 npm ERR! code ELIFECYCLE npm ERR! contextify@0.1.14 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the contextify@0.1.14 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the contextify package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls contextify npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\mynode\npm-debug.log 

我正在使用node.js v0.12.4,Python 2.7和Windows 7 64位。 我已经设置了环境variablesPythonPath = C:\ Python27和PYTHON = C:\ Python27 \ python.exe。 我该怎么办才能解决这个问题?