我遇到了一个非常恼人的错误:
"C:\Program Files\nodejs\node_modules\npm\b
in\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" 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:\myprog\node_modules\socket.io\node_modules\sock
et.io-client\node_modules\engine.io-client\node_modules\ws\build\binding.sln]
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:\myprog\node_modules\socket.io\node_modules\sock
et.io-client\node_modules\engine.io-client\node_modules\ws\build\binding.sln]
socket.io@1.1.0 node_modules\socket.io
├── debug@0.7.4
├── has-binary-data@0.1.3 (isarray@0.0.1)
├── socket.io-parser@2.2.1 (isarray@0.0.1, component-emitter@1.1.2, benchmark@1.
0.0, json3@3.2.6)
├── socket.io-adapter@0.2.0 (socket.io-parser@2.1.2)
├── engine.io@1.4.0 (base64id@0.1.0, debug@1.0.3, engine.io-parser@1.1.0, ws@0.4
.31)
└── socket.io-client@1.1.0 (to-array@0.1.3, indexof@0.0.1, component-bind@1.0.0,
object-component@0.0.3, has-binary@0.1.5, component-emitter@1.1.2, socket.io-pa
rser@2.2.2, parseuri@0.0.2, engine.io-client@1.4.0)
当我检查我的添加/删除程序时,它看起来像我已经拥有:
Microsoft Visual C++ 2005 Redistributable
Microsoft Visual C++ 2005 Redistributable (x64)
Microsoft Visual C++ 2008 Redistributable (x64)
Microsoft Visual C++ 2008 Redistributable (x86)
Microsoft Visual C++ 2010 Redistributable (x86)
Microsoft Visual C++ 2010 Redistributable (x64)
Microsoft Visual C++ 2012 Redistributable (x64)
Microsoft .NET Framework 4.5.1
我有64位Windows 7,并且正在运行从64位安装程序安装的最新版本的nodejs(v0.10.32)。如何在不安装Visual Studio的完整副本的情况下解决此错误?
我看到有人在其他地方提到----Instead of compiling the binaries on server, do it on local system.
这根本不对我有用,我也不知道该怎么做。
答案 0 :(得分:0)
您必须至少安装Visual C ++ Express 2010或更高版本。我不确定VC + 2013是否受node / node-gyp附带的gyp版本的支持。您还需要安装Windows 7.0 SDK以使用VC ++的Express版本编译64位(尽管我不确定VC ++是否需要比2010年更新)。
此外,如果您安装Express 2012版本,您选择“for Windows Desktop”版本,因为有单独的安装用于编写Metro应用程序。