You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Please update gyp to add support for Visual Studio 2013 #339
I've started down this path and found I could not simply swap in gyp r1725 as the calling convention seems to have changed. I started modifying configure.js and node-gyp.js and found myself spiralling inward.
I will attempt to patch by bringing in the updated gyp files that add VS 2013 support without bringing in all updates to gyp.
While reviewing the gyp changes, I also noticed that support for --msvs_version has been dropped from newer versions of gyp.
Windows 8.1 x64 with Visual Studio Professional 2013. Unable to compile node-spatialite.
Warning: for VCCLCompilerTool/CompileAs, invalid literal for int() with base 10:
'CompileAsCpp'
Warning: for VCCLCompilerTool/CompileAs, invalid literal for int() with base 10:
'CompileAsCpp'
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. [...\node_modules\spatia
lite\build\binding.sln]
I've managed to compile node-sqlserver on Windows 8.1. First I've tried Windows SDK for 8.1, but there was a problem with finding VCBuild.exec by msbuild.exe. Then I've added the VS 2013 Desktop Express. It fixed the issue with VCBuild.exe but then I received the below error:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found.
Anybody knows if those changes are all needed. If yes, I'll provide a patch (pull request), so it will work without moving the whole gyp (as I read above it is not currently easy to move it to node-gyp).
Still have to explicitly specify --msvs-version=2013 in order to install any npm package with node-gyp dependency without errors. Is there a workaround for this issue?
Platform: Windows 8.1 x64, Visual Studio 2013, node 0.10.32, node-gyp 1.0.2
Now, node-gyp will support your Visual Studio 2013 - you can check in the <npm-cache>/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py, in _CreateVersion method.
However, the native modules still won't build, giving an error that some include files are missing (ones from Windows SDK, like say winsock2.h). That is because Visual Studio 2013 is bundled with 7.1A SDK as the default. But default Toolset setting is 'v120', which expects the 8.1 SDK (which needs to be installed additionally).
To build with just the stock VS 2013, you need to change what toolset is being selected. You can do that by modifying ~/.node-gyp/common.gypi file (idea taken from here), and changing the toolset to 'v120_xp' instead (which will use the bundled 7.1A SDK):
For me, .node-gyp doesn't have common.gypi. A subfolder, 0.12.3, does - but that file doesn't contain the line with "msbuild_toolset".
This is after I removed and reinstalled, my node-gyp version is 1.0.3, installed globally...
I know this is closed, but it just doesn't seem resolved - I have VS 2013, installed the latest version, and it doesn't work.. is there anything else I can try?
I get simply:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(55,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [D:....\node_modules\nightmare\node_modules\phantom\node_modules\dnode\node_modules\weak\build\weakref.vcxproj]
In the end after posting here a colleague told me to try setting the environment variable GYP_MSVS_VERSION to 2013, which worked instantly. Yours may work too keith thanks, but I'd suggest others with the problem could try "setx GYP_MSVS_VERSION 2013 /M" from an admin command prompt / PowerShell too :)
Activity
JayBeavers commentedon Oct 19, 2013
Repro Case:
Windows 7 x64 computer with Visual Studio Express 2013 for Windows Desktop
Unable to compile node addins such as node-serialport
samuelg commentedon Oct 22, 2013
Repro Case:
Windows 8.1 x64 with Visual Studio Professional 2013. Unable to compile node-spatialite.
Warning: for VCCLCompilerTool/CompileAs, invalid literal for int() with base 10:
'CompileAsCpp'
Warning: for VCCLCompilerTool/CompileAs, invalid literal for int() with base 10:
'CompileAsCpp'
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. [...\node_modules\spatia
lite\build\binding.sln]
samuelg commentedon Oct 22, 2013
Installing Microsoft Visual Studio C++ 2012 for Windows Desktop Express Edition fixes this. It would be nice to not have this dependency however.
gluwer commentedon Oct 28, 2013
Hi,
I've managed to compile node-sqlserver on Windows 8.1. First I've tried Windows SDK for 8.1, but there was a problem with finding VCBuild.exec by msbuild.exe. Then I've added the VS 2013 Desktop Express. It fixed the issue with VCBuild.exe but then I received the below error:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found.
I've changed the MSVSversion.py file by adding almost the same configurations as for VS 2012 (in several places; as in https://code.google.com/p/gyp/source/browse/trunk/pylib/gyp/MSVSVersion.py?spec=svn1763&r=1725) and this allowed to make a build.
Anybody knows if those changes are all needed. If yes, I'll provide a patch (pull request), so it will work without moving the whole gyp (as I read above it is not currently easy to move it to node-gyp).
JayBeavers commentedon Nov 5, 2013
In R1776, gyp fixes the remaining issue in VS 2013 support. Should be good to go for an update a this point.
JayBeavers commentedon Nov 13, 2013
Works beautifully, thank you.
koistya commentedon Oct 14, 2014
Still have to explicitly specify
--msvs-version=2013in order to install anynpmpackage withnode-gypdependency without errors. Is there a workaround for this issue?Platform: Windows 8.1 x64, Visual Studio 2013, node 0.10.32, node-gyp 1.0.2
gimelfarb commentedon Oct 31, 2014
Updated
node-gypto the latest version (1.0.2) by:npm install node-gyp -gNote that you also have to update the
node-gypthat is internally used by nodeNow,
node-gypwill support your Visual Studio 2013 - you can check in the<npm-cache>/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py, in_CreateVersionmethod.However, the native modules still won't build, giving an error that some include files are missing (ones from Windows SDK, like say
winsock2.h). That is because Visual Studio 2013 is bundled with 7.1A SDK as the default. But default Toolset setting is 'v120', which expects the 8.1 SDK (which needs to be installed additionally).To build with just the stock VS 2013, you need to change what toolset is being selected. You can do that by modifying
~/.node-gyp/common.gypifile (idea taken from here), and changing the toolset to 'v120_xp' instead (which will use the bundled 7.1A SDK):Voila - now the native npm modules will compile with the stock Visual Studio 2013 install!
eirslett commentedon Dec 16, 2014
@gimelfarb Thanks a lot! I followed your instructions and in finally worked! 👍
gimelfarb commentedon May 12, 2015
@voltagex
C:\Users\<username>\.node-gypor using variables%USERPROFILE%\.node-gypkierenj commentedon May 22, 2015
For me, .node-gyp doesn't have common.gypi. A subfolder, 0.12.3, does - but that file doesn't contain the line with "msbuild_toolset".
This is after I removed and reinstalled, my node-gyp version is 1.0.3, installed globally...
I know this is closed, but it just doesn't seem resolved - I have VS 2013, installed the latest version, and it doesn't work.. is there anything else I can try?
I get simply:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(55,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [D:....\node_modules\nightmare\node_modules\phantom\node_modules\dnode\node_modules\weak\build\weakref.vcxproj]
keithl8041 commentedon Jun 10, 2015
@kierenj did you follow the instructions posted earlier detailing how to re-install node-gyp. Solved my issue, I was getting the same as you.
kierenj commentedon Jun 11, 2015
In the end after posting here a colleague told me to try setting the environment variable GYP_MSVS_VERSION to 2013, which worked instantly. Yours may work too keith thanks, but I'd suggest others with the problem could try "setx GYP_MSVS_VERSION 2013 /M" from an admin command prompt / PowerShell too :)