首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Windows 7上安装contextify时出错:`gyp`失败,退出代码:2

在Windows 7上安装contextify时出错:`gyp`失败,退出代码:2
EN

Stack Overflow用户
提问于 2012-12-16 14:37:44
回答 1查看 3.9K关注 0票数 0

这是我在运行npm install contextify时得到的结果

代码语言:javascript
复制
npm http GET https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

> contextify@0.1.3 install C:\node_modules\myfolder\node_modules\contextify
> node-gyp rebuild


C:\node_modules\myfolder\node_modules\contextify>node "C:\Program Files\nodejs\node_
modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebui
ld
python: can't open file 'C:\Users\Username\.node-gyp\0.8.16\tools\gyp\gyp': [Errn
o 2] No such file or directory
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_module
s\npm\node_modules\node-gyp\lib\configure.js:395:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
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:\node_modules\myfolder\node_modules\contextify
gyp ERR! node -v v0.8.16
gyp ERR! node-gyp -v v0.7.3
gyp ERR! not ok
npm ERR! contextify@0.1.3 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the contextify@0.1.3 install script.
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! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "contextify"
npm ERR! cwd C:\node_modules\myfolder
npm ERR! node -v v0.8.16
npm ERR! npm -v 1.1.69
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\node_modules\myfolder\npm-debug.log
npm ERR! not ok code 0

我有node x64 v0.8.16和node-gyp v0.8.1

我有Python2.7.3,.Net Framework4,Microsoft Visual StudioWindows2010Express,Windows764位C++和Microsoft Visual C++ 2010Service Pack1编译器。

我已经重启了我的电脑。我错过了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-01-25 11:18:54

尝试安装node-gyp

代码语言:javascript
复制
npm install -g node-gyp

还有,你安装了什么版本的python,我相信你需要2.7

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13899187

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档