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
Windows 10: The build tools for v120 (Platform Toolset = 'v120') cannot be found. #679
When installing package via NPM some module had dependency that fired node-gyp rebuild which spawns tons of errors:
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build t
ools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install v120 bui
ld tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-cli
ck the solution, and then selecting "Retarget solution". [C:\Users\nerij\Projects\react-browserify-cli\node_modules\bro
wser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modul
es\utf-8-validate\build\validation.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\nerij\Projects\react-browserify-cli\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing bufferutil@1.1.0
npm WARN optional dep failed, continuing utf-8-validate@1.1.0
This is part of install which gets errors. I fallowed instruction on node-gyp install, however Windows 10 does not allow instal Windows 7 SDKs (I found and installed Windows 10 SDKs, with no efefct). Anyone had same issues?
Reacted by Friedrich von Never, Brian Clifton, uelton-hbsis, mengxingshike2012, Emanuel Tesař, Doug Ludlow, Anton Trofymenko, ssuji, Izzur Zuhri, Erik Dombi and 15 more
Reacted by Digender Mahara, Kevin van der Werff, Zulfikra Lahmudin, Vitaly and femi
I have same problem in Windows 10 with VS2015&SDK.
:-(
Reacted by uelton-hbsis, josemadriz, Argyris Margaritis, Doug Ludlow, Evalds Urtans, Lukas Addon, alexij1997, Erik Dombi, Austin, Ondrej Balaz and 10 more
If there were a +1 button, I'd be clicking it myself right now, but there's not, so I'm forced to pollute your issue with my comment. Please accept my humblest apologies. Windows 10 user. VS2015 and VS2013 both installed, and both with C++. utf-8-validate is the offender in my case too.
I'm having problems with Windows 10. VS2015 community installed. I get the following error
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 Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.
Guys, this worked for me; add GYP_MSVS_VERSION=2013 to your user environment variables.
i.e. right-click start -> system -> advanced system settings -> environment variables -> "user variables for [username]" -> new
Make sure you open a new console after doing this, so that the environment variable addition is picked up.
Reacted by Dean Witcraft, Smaran Harihar, Connor, Gonzalo Santomé, Guillaume Masson, theGloves, Izzur Zuhri, Ajey Charantimath, CXXN008, bread and 3 more
BTW what SDK are people using?
Im still using the one from the readme, if anyone gets this working on Windows 10 i would be ever so grateful if you could write a walkrthough, step by step guide. I've been struggling with this for the past few days now
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(214,5): error MSB4175: The task fac
tory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Build.Tasks.v12.0.dll". Cou
ld not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Build.Tasks.v12.0.dll' or one of its dependencies.
The system cannot find the file specified.
@Jayflux I also ended up installing beta npm@3 (using 3.3.0 currently), I'm not sure which of the above finally made it work, but it does now, at least on Win 8.1
@zhaoyao91
Windows 10
Visual Studio 2013
I have both SDK 7.1 and SDK 10 installed, I think its using 10 (any way for me to confirm this)?
set GYP_MSVS_VERSION=2013
npm install --msvs_version=2013
For the summary, Properly install of Python2.7, C++ build tools, then walk through Resolving common issues section on the Microsoft's nodejs guideline should help.
In general the recommendation is always to use the same PlatformToolset for addons and for the node engine itself. This means the same compiler should be used to build node and addons.
Older versions of node were built with VS2013, since 6.3.0 I think VS2015 is used.
In general the recommendation is always to use the same PlatformToolset for addons and for the node engine itself. This means the same compiler should be used to build node and addons.
Doesn't this mean in effect we only support building native modules on Windows with one version of Visual Studio?
one should not mix, currently node binaries from nodejs.org are built with VS2015 and PlatformToolkit v140. But one can easily build node yourself with own version of VisualStudio and build modules as needed.
node-gyp: v3.4.0
Windows 10 and full VS2013 and VS2015 installed (tried on 2 machines).
Setting --msvs_version=2015 and GYP_MSVS_VERSION=2015 does not help.
Only after changing PATH it seems to work: set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
for using vs2013 it's required the similar : set PATH=C:\Program Files (x86)\MSBuild\12.0\Bin;%PATH%
how the hell should I understand which VC++ version a package require? Why node-gyp's script can not declare it?! Why node-gyp can find a working VC++ version on machine?
that's all simply terrible.
This is twice as terrible if you don't have admin rights (installations are possible yet it might take a long time to be done) due to some corporative standards)))))
closing due to staleness, windows support has evolved somewhat since this was opened, please open a new issue if there's a new specific thing that can be discussed
I had this similar issue on windows 10 and node 11, npm install was failing due to node-gyp rebuild command was unable to complete. I tried every solution i could find including installing mvs 2015, python 2.7 nothing worked.
Then i tried with latest node version i.e 16 and used git bash(terminal) instead of windows cmd and i don't know how but it worked. At this point i have mvs verion 2019 and 2015 installed and mvs version 2019 set in npm config.
Hope this helps..!!
What's the proper way to install node-gyp in 2022?
I'm doing npm install in https://github.com/creativetimofficial/impact-design-system/ , and I get errors pointing to this library. The error states that I have version3, but npm ls -g says that I have version9.
Activity
perok commentedon Aug 4, 2015
Have you installed visual studio 2015 with visual C++? That helped for me.
nerijusgood commentedon Aug 5, 2015
The above error is with MVS 2015 C++. Could not do anything here so I completely removed MVS 2015 and installed 2013 C++.
Now it seems to have different error. The error is with too long path names (opened case in stack overflow, since its not node-gyp fault): http://stackoverflow.com/questions/31817447/windows-10-node-gyp-cannot-build-msbuild-failed-with-exit-code-1
Any ideas?
BlackGlory commentedon Aug 8, 2015
I have same problem in Windows 10 with VS2015&SDK.
:-(
axefrog commentedon Aug 14, 2015
If there were a +1 button, I'd be clicking it myself right now, but there's not, so I'm forced to pollute your issue with my comment. Please accept my humblest apologies. Windows 10 user. VS2015 and VS2013 both installed, and both with C++. utf-8-validate is the offender in my case too.
musm commentedon Aug 14, 2015
I'm having problems with Windows 10. VS2015 community installed. I get the following error
axefrog commentedon Aug 14, 2015
Guys, this worked for me; add GYP_MSVS_VERSION=2013 to your user environment variables.
i.e. right-click start -> system -> advanced system settings -> environment variables -> "user variables for [username]" -> new
Make sure you open a new console after doing this, so that the environment variable addition is picked up.
uxfed commentedon Aug 16, 2015
@axefrog Thank you!!!!!!
With Windows 8.1 and VS2015 SDK/C++ installed I had to use:
GYP_MSVS_VERSION=2015
(so change the version to what you're using)
jasonwilliams commentedon Aug 18, 2015
BTW what SDK are people using?
Im still using the one from the readme, if anyone gets this working on Windows 10 i would be ever so grateful if you could write a walkrthough, step by step guide. I've been struggling with this for the past few days now
@pjquinn I now get this error instead:
Can anyone help? :(
uxfed commentedon Aug 18, 2015
Maybe try VS2015 w/ C++ and set env variable: GYP_MSVS_VERSION=2015
I'm on win 8.1 though, not 10
jasonwilliams commentedon Aug 23, 2015
@pjquinn that didn't work for me :-(
uxfed commentedon Aug 24, 2015
@Jayflux I also ended up installing beta npm@3 (using 3.3.0 currently), I'm not sure which of the above finally made it work, but it does now, at least on Win 8.1
jasonwilliams commentedon Aug 24, 2015
@pjquinn finally got it working by uninstalling Visual Studio 2015 and installing 2013, then i ran
So 2013 deffo works on windows 10, not sure why 2015 fails
zhaoyao91 commentedon Aug 25, 2015
@Jayflux what version of window, vs, and sdk are you using now?
jasonwilliams commentedon Aug 26, 2015
@zhaoyao91
Windows 10
Visual Studio 2013
I have both SDK 7.1 and SDK 10 installed, I think its using 10 (any way for me to confirm this)?
set GYP_MSVS_VERSION=2013
npm install --msvs_version=2013
42 remaining items
hungcao181 commentedon Oct 10, 2016
These official guidelines resolved my problem:
https://github.com/nodejs/node-gyp#installation
https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#resolving-common-issues
For the summary, Properly install of Python2.7, C++ build tools, then walk through Resolving common issues section on the Microsoft's nodejs guideline should help.
NicolasDorier commentedon Jun 7, 2017
My problem was the MSBuild pointed by the PATH environment variable was not the expected version.
Correct one is "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" (Visual Studio 2015 build tools installed)
Ran again npm install, and worked like a charm.
ira-hart commentedon Jun 8, 2017
The fix for me was to do this in Microsoft Visual Studio 2017:
project -> Retarget_solution
Platform toolset
and then:
project -> Retarget_solution
Windows SDK version
After that, it built with no issues.
crazysal commentedon Jun 9, 2017
https://www.npmjs.com/package/windows-build-tools
npm install --global windows-build-tools
Installs all dependencies as needed
saper commentedon Aug 17, 2017
I believe this can be closed now.
In general the recommendation is always to use the same
PlatformToolsetfor addons and for the node engine itself. This means the same compiler should be used to build node and addons.Older versions of node were built with VS2013, since 6.3.0 I think VS2015 is used.
gibfahn commentedon Aug 19, 2017
Doesn't this mean in effect we only support building native modules on Windows with one version of Visual Studio?
saper commentedon Aug 19, 2017
one should not mix, currently node binaries from nodejs.org are built with VS2015 and PlatformToolkit v140. But one can easily build node yourself with own version of VisualStudio and build modules as needed.
happygrizzly commentedon Nov 2, 2018
This is twice as terrible if you don't have admin rights (installations are possible yet it might take a long time to be done) due to some corporative standards)))))
rvagg commentedon Jun 20, 2019
closing due to staleness, windows support has evolved somewhat since this was opened, please open a new issue if there's a new specific thing that can be discussed
ashish314 commentedon May 18, 2021
I had this similar issue on windows 10 and node 11, npm install was failing due to node-gyp rebuild command was unable to complete. I tried every solution i could find including installing mvs 2015, python 2.7 nothing worked.
Then i tried with latest node version i.e 16 and used git bash(terminal) instead of windows cmd and i don't know how but it worked. At this point i have mvs verion 2019 and 2015 installed and mvs version 2019 set in npm config.
Hope this helps..!!
davidalbertonogueira commentedon Jun 27, 2022
What's the proper way to install node-gyp in 2022?
I'm doing npm install in https://github.com/creativetimofficial/impact-design-system/ , and I get errors pointing to this library. The error states that I have version3, but npm ls -g says that I have version9.
Links: creativetimofficial/impact-design-system#24
Latest issue that I oppened : #2688 (#2688)
cclauss commentedon Jun 27, 2022
node-gyp v9 is current. https://github.com/nodejs/node-gyp/releases
https://github.com/nodejs/node-gyp/tree/main/docs#readme
docs: add a note on Spectre-mitigated libraries (nodejs#679)