'gyp'在退出代码时失败:1尝试使用npm在Windows上安装zookeeper时失败

时间:2013-08-28 18:48:27

标签: node.js windows-7 npm apache-zookeeper

我尝试使用npm 1.3.9在Windows 7上安装Zookeeper 3.4.5。当我进入

npm install zookeeper

我得到了

File "C:\Program Files\npm-1.3.9\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSProject.py", line 181, in AddFileConfig
raise ValueError('AddFileConfig: file "%s" not in project.' % path)
ValueError: AddFileConfig: file "." not in project.
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\npm-1.3.9\node_modules\npm\node_modules\node-gyp\lib\configure.js:424:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\npm-1.3.9\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files\Zookeeper-3.4.5\node_modules\zookeeper
gyp ERR! node -v v0.10.17
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok 
npm ERR! weird error 1
npm ERR! not ok code 0

2 个答案:

答案 0 :(得分:2)

由于这是一个巨大且烦人的问题,我已经用许多不同的(非永久性的方式)解决了,我最终在这里找到答案:

Error installing node-gyp on ubuntu

由于您使用的是Windows,请尝试使用以前版本的Python(对我而言,它使用的是2.6)用于Windows。

答案 1 :(得分:1)

试试这个node-gyp installation。它对我有用。

够了:

help('modules')