Windows 10: The build tools for v120 (Platform Toolset = 'v120') cannot be found.
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 [email protected]
npm WARN optional dep failed, continuing [email protected]
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?
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.
Links: https://github.com/creativetimofficial/impact-design-system/issues/24 Latest issue that I oppened : #2688 (https://github.com/nodejs/node-gyp/issues/2688)
npm ERR! gyp ERR! node-gyp -v v3.8.0
node-gyp v9 is current. https://github.com/nodejs/node-gyp/releases
https://github.com/nodejs/node-gyp/tree/main/docs#readme