我有VisualStudio2010与SP1和WindowsSDK7.1。我还有VS2012和Windows 8。
当我运行Windows SDK 7.1 Command Prompt和运行node-gyp build --msvs_version=2010时,它会给出错误:
error MSB3411: Could not load the Visual C++ component "VCBuild.exe".
If the component is not installed,
either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Fr
amework 3.5, or 2) install Microsoft Visual Studio 2008.是想找到VCBuild.exe。
我发现了vcbuild已被msbuild所取代。。
这是一个有效的错误吗?
我还发现,在Windows7中,对于.NET 3.5,只需要从控制面板打开它。我看过关于堆栈溢出的其他问题,比如这里和这。
但是问题是,既然vcbuild.exe不存在于vs2010系统中,那么为什么not要搜索它呢?还是我漏掉了什么?
如何解决此错误?
发布于 2013-09-13 06:30:31
设置VS2010和node-gyp wiki列出的其他应用程序解决了这些问题。
在Windows /Vista/7上,node需要Python2.7和Visual 2010
根据MicrosoftVisualSDK2010ServicePack 1编译器更新WindowsSDK7.1中的自述文件,以确保系统具有受支持的配置,
首先卸载以下产品--(如果您想节省大量时间)
然后按照列出的顺序重新安装它们:(您可以按任意顺序卸载:P)
Visual Studio 2010
Windows SDK 7.1
Visual Studio 2010 SP1
Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1在x64环境中,列表中的最后一次更新修复了有关缺少编译器和
error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found。
发布于 2015-04-21 05:54:17
你所有问题的答案都是这里。为了找到这个我费了很大劲。终于起作用了。=)
为了节省你的时间,访问这里的链接是什么是有用的链接。
指令:
您可以使用npm安装:
$ npm install -g node-gyp您还需要安装:
在Unix上:
在Windows上:
- try uninstalling any C++ 2010 x64&x86 Redistributable that you have installed first.
- If you get errors that the 64-bit compilers are not installed you may also need the compiler update for the Windows SDK 7.1
Windows 7/8:
$ node-gyp --python /path/to/python2.7如果node是通过npm调用的,并且安装了多个Python版本,那么可以将npm的“python”配置键设置为适当的值:
$ npm config set python /path/to/executable/python2.7发布于 2016-09-22 19:57:28
可以通过使用windows-构建工具安装所有必需的工具和配置来解决这一问题,使用npm install --global --production windows-build-tools从提升的cmd (以管理员身份运行)。
https://stackoverflow.com/questions/18608928
复制相似问题