我试过了一切,我安装了正确版本的Python(Python27),安装了Windows SDK 8.1,但Visual C++也安装了,但构建仍然失败。我正在使用Visual Studio 2015社区编辑器。当我尝试从CMD我碰到下面的错误执行node-gyp build
:在Visual Studio 2015中构建node-gyp项目时出现LNK1104错误
> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.t
argets(44,5): error MSB8020: The builds tools for v140 (Platform Toolset = 'v14
0') cannot be found. To build using the v140 build tools, either click the Proj
ect menu or right-click the solution, and then select "Update VC++ Projects..."
. Install v140 to build using the v140 build tools. [C:\Users\Programming PC\Do
cuments\GitHub\node-addon-examples\1_hello_world\node_0.10\build\hello.vcxproj]
此错误促使我进入到Visual Studio,看看该项目至少可以建立并从那里运行,它没有。
请帮我看看所有与这个问题有关的其他问题,但他们的解决方案都没有帮助我。
您是否尝试明确设置'msvs_version'如:'node-gyp rebuild --msvs_version = 2015'? – mscdex
是msvs_version = 2015甚至在我的.npmrc中硬编码 – lavacode
您安装的Visual C++的版本究竟是什么? Visual Studio社区? Visual Studio Express for Windows? Visual Studio Express for Desktop? (小贴士:我一直使用Express for Desktop,并且没有问题) – mscdex