npm install dnode失败,节点为0.8.1& WIN7

时间:2012-07-06 06:51:45

标签: node.js npm dnode

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

错误2与py2.7

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

2 个答案:

答案 0 :(得分:0)

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

您可以在控制台中输入python --version

答案 1 :(得分:0)

解决。

读完node-gyp的自述文件后, 我很遗憾地发现我没有安装Microsoft Visual C ++ Express 2010,

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

npm安装dnode成功,只有警告。

问题在于:https://github.com/TooTallNate/node-gyp/issues/97