1

试过 python 2.7.3 & 3.x,都失败了。

py2.7的error2

E:\Workspace\Code\SmartDoor>python
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> ^Z^Z
E:\Workspace\Code\SmartDoor>npm install E:\Workspace\Git\dnode\
npm http GET https://registry.npmjs.org/dnode-protocol
npm http GET https://registry.npmjs.org/weak
npm http GET https://registry.npmjs.org/jsonify
npm http 408 https://registry.npmjs.org/weak
npm ERR! registry error parsing json
npm http GET https://registry.npmjs.org/weak
npm http 304 https://registry.npmjs.org/weak
npm http 304 https://registry.npmjs.org/jsonify
npm http 304 https://registry.npmjs.org/dnode-protocol
npm http GET https://registry.npmjs.org/traverse
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/traverse

weak@0.2.1 install E:\Workspace\Code\SmartDoor\node_modules\dnode\node_modules
\weak
node-gyp rebuild
E:\Workspace\Code\SmartDoor\node_modules\dnode\node_modules\weak>node "C:\Progra
m Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-
gyp\bin\node-gyp.js" rebuild
gyp http GET http://nodejs.org/dist/v0.8.1/node-v0.8.1.tar.gz
gyp http 200 http://nodejs.org/dist/v0.8.1/node-v0.8.1.tar.gz
gyp ERR! Completion callback never invoked!
gyp ERR! This is a bug in node-gyp, please file an Issue:
gyp ERR! https://github.com/TooTallNate/node-gyp/issues
gyp ERR! not ok
npm ERR! weak@0.2.1 install: node-gyp rebuild
npm ERR! cmd "/c" "node-gyp rebuild" failed with 6
npm ERR!
npm ERR! Failed at the weak@0.2.1 install script.
npm ERR! This is most likely a problem with the weak 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 weak
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program File
s (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "E:\Workspace\G
it\dnode\"
npm ERR! cwd E:\Workspace\Code\SmartDoor
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message weak@0.2.1 install: node-gyp rebuild
npm ERR! message cmd "/c" "node-gyp rebuild" failed with 6
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! E:\Workspace\Code\SmartDoor\npm-debug.log
npm ERR! not ok code 0
4

2 回答 2

0

你确定你有 python 2 吗?因为它说你的python是3...

你能输入python --version你的控制台吗?

于 2012-07-06T07:32:37.570 回答
0

解决了。

在我阅读了node-gyp的README之后,很遗憾我没有安装Microsoft Visual C++ Express 2010,

安装http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express后,

npm install dnode 成功,只有警告。

这是问题所在:https ://github.com/TooTallNate/node-gyp/issues/97

于 2012-07-08T05:54:46.377 回答