2013-10-12 76 views
1

我试图安装hiredis和memwatch。但是,调用node-gyp rebuild返回错误如下。我认为需要重建节点源文件。我有源文件,但我不知道如何配置它。node-gyp rebuild总是返回错误

G:\v0.2\node_modules\memwatch>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\.. 
\node_modules\node-gyp\bin\node-gyp.js" rebuild 
    heapdiff.cc 
    memwatch.cc 
    util.cc 
    init.cc 
g:\v0.2\node_modules\memwatch\src\heapdiff.hh(8): fatal error C1083: Cannot open include file: 'v8. 
h': No such file or directory [G:\v0.2\node_modules\memwatch\build\memwatch.vcxproj] 
..\src\init.cc(5): fatal error C1083: Cannot open include file: 'v8.h': No such file or directory [ 
G:\v0.2\node_modules\memwatch\build\memwatch.vcxproj] 
g:\v0.2\node_modules\memwatch\src\memwatch.hh(8): fatal error C1083: Cannot open include file: 'nod 
e.h': No such file or directory [G:\v0.2\node_modules\memwatch\build\memwatch.vcxproj] 
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception 
handler used, but unwind semantics are not enabled. Specify /EHsc [G:\v0.2\node_modules\memwatch\b 
uild\memwatch.vcxproj] 
gyp ERR! build error 
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit c 
ode: 1 
gyp ERR! stack  at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\nod 
e-gyp\lib\build.js:267:23) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:98:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:784:12) 
gyp ERR! System Windows_NT 6.1.7600 
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\ 
node-gyp.js" "rebuild" 
gyp ERR! cwd G:\v0.2\node_modules\memwatch 
gyp ERR! node -v v0.10.5 
gyp ERR! node-gyp -v v0.9.5 
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the memwatch 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 memwatch 
npm ERR! There is likely additional logging output above. 

npm ERR! System Windows_NT 6.1.7600 
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\n 
pm\\bin\\npm-cli.js" "install" "memwatch" 
npm ERR! cwd G:\v0.2 
npm ERR! node -v v0.10.5 
npm ERR! npm -v 1.2.18 
npm ERR! code ELIFECYCLE 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  G:\v0.2\npm-debug.log 
npm ERR! not ok code 0 

回答

2

你在窗户上吗?你有没有安装Visual Studio?我只好用标志--msvs_version = 2012

+0

谢谢您的回答,但我已经有了答案,从通过节点IRC TooTallNate。他告诉我删除'.node-gyp'文件夹并重新下载源代码...这工作:) – user2522545