我无法安装任何需要编译的模块。它们全部失败,并出现以下错误:MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe". ...我的环境:Windows 7 Enterprise x64版本6.1.7601节点x86 0.8.16npm 1.2.0节点gyp 0.8.2Visual Studio 2012和众多软件包相关环境变量:Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShel l\v1.0;C:\Program Files\TortoiseGit\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\tools;c:\tools\node没有INCLUDE,LIB,LIBPATH等。我对该问题进行了简短的调查,发现通过以下设置,手动克隆的git://github.com/einaros/ws.git的手动编译(直接调用VCBuild.exe和msbuild.exe)成功完成:SET Configuration=ReleaseSET PATH=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\vcpackagesSET PATH=%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\bin;%PATH%SET PATH=%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\Common7\IDE;%PATH%SET PATH=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A\Bin;%PATH%SET PATH=%SystemRoot%\system32;%PATH%SET INCLUDE=%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\includeSET INCLUDE=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A\Include;%INCLUDE%SET LIB=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A\LibSET LIB=%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\lib;%LIB%SET MSBUILD="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"VCBuild.exe C:\Tools\node\ws\build\bufferutil.vcproj "Release|Win32" /useenvVCBuild.exe C:\Tools\node\ws\build\validation.vcproj "Release|Win32" /useenv%MSBUILD% build/binding.sln /verbosity:diagnostic /nologo /p:Configuration=Release;Platform=Win32我试图用相同的变量调用node-gyp,但失败了:C:\!> git clone https://github.com/einaros/ws.gitC:\!> cd wsC:\!\ws>node-gyp configure...
3 回答
jeck猫
TA贡献1909条经验 获得超7个赞
要在没有安装VS2010的情况下(仅限2012年)执行此操作,请设置msvs_version标志:
node-gyp rebuild --msvs_version=2012
npm install <module> --msvs_version=2012
按照@Jacob的评论
npm install --msvs_version=2013 如果您有2013版
- 3 回答
- 0 关注
- 771 浏览
添加回答
举报
0/150
提交
取消