2015-07-21 25 views
0

我想通过在Windows上遵循本指南安装回环。不能得到环回正确安装... C++错误

http://docs.strongloop.com/display/SL/Installing+Node+and+StrongLoop+on+Windows 

我已经安装了Python 2.7.1 64,64的NodeJS和C++运行时2013 64 & 32.重新启动我的电脑。然后当我运行

npm install -g strongloop 

我得到这个回:

Copyright (c) 2009 Microsoft Corporation. All rights reserved. 

C:\Users\ronak.patel>npm install -g strongloop 
npm WARN optional dep failed, continuing [email protected] 
/


> [email protected] install C:\Users\ronak.patel\AppData\Roaming\npm\node_modules\s 
trongloop\node_modules\strong-supervisor\node_modules\heapdump 
> node-gyp rebuild 


C:\Users\ronak.patel\AppData\Roaming\npm\node_modules\strongloop\node_modules\st 
rong-supervisor\node_modules\heapdump>if not defined npm_config_node_gyp (node " 
C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\no 
de-gyp\bin\node-gyp.js" rebuild) else (node rebuild) 
Building the projects in this solution one at a time. To enable parallel build, 
please add the "/m" switch. 
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". 
To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua 
l Studio 2005 or 3) add the location of the component to the system path if it 
is installed elsewhere. [C:\Users\ronak.patel\AppData\Roaming\npm\node_modules 
\strongloop\node_modules\strong-supervisor\node_modules\heapdump\build\binding. 
sln] 
gyp ERR! build error 
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe 
` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ 
npm\node_modules\node-gyp\lib\build.js:269:23) 
gyp ERR! stack  at ChildProcess.emit (events.js:110:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:1074 
:12) 
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:\Users\ronak.patel\AppData\Roaming\npm\node_modules\strongloop\no 
de_modules\strong-supervisor\node_modules\heapdump 
gyp ERR! node -v v0.12.7 
gyp ERR! node-gyp -v v2.0.1 
gyp ERR! not ok 



> [email protected] install C:\Users\ronak.patel\AppData\Roaming\npm\node_modules 
\strongloop\node_modules\ws\node_modules\bufferutil 
> node-gyp rebuild 

- 
C:\Users\ronak.patel\AppData\Roaming\npm\node_modules\strongloop\node_modules\ws 
\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Fi 
les\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\no 
de-gyp.js" rebuild) else (node rebuild) 
^CTerminate batch job (Y/N)? y 

回答

0

heapdump(和bufferutil)在这种情况下,实际上是可选的依赖关系,因此,如果他们不进行编译/安装,则模块(strongloop)仍然会安装,应该可以正常工作。

但是,如果您想确保可选的依赖项被构建/安装,您将不仅需要安装C++运行时。您至少需要安装Visual Studio Express(2012或更新版本,但2012应能正常工作)以获取编译插件所需的编译器,头文件等。

+0

将“visual studio 2012 express for web”工作? – user2061886

+0

对于2012,您需要[Visual Studio Express 2012 for Windows Desktop](http://www.microsoft.com/en-us/download/details.aspx?id=34673)。 – mscdex