pty.js
pty.js copied to clipboard
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "4.0".
When running npm install pty.js on windows I get:
C:\cygwin\opts\newclient\node_modules\pty.js>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "4.0".
gypnpm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls pty.js
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200 npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "pty.js" npm ERR! cwd C:\cygwin\opts\newclient npm ERR! node -v v0.10.25 npm ERR! npm -v 1.3.24 npm ERR! code ELIFECYCLE
I have installed winpty, but apparently I'm missing some tools. What do I need more?
Install a visual studio express 2013(desktop with c++ redist), this will help
Thanks! It helped!
Surely a whole 8GB of IDE aren't needed just to get this working? Is there not a smaller option?
You can try also Microsoft build tools teh standalone package,
But a general recomendation - use mac or ubuntu :)
Sadly installing Microsoft Build Tools (as mentioned on previous message) wont work, since it installs "12.0". Basically, you'll get something like this: MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "12.0", "4.0". I used Linux all my life, but due to a Xamarin project im working on, i needed to switch to windows. This is hell. None of my NodeJs projects are working, and the only error im getting is the previous one. Do you think is there any chance to allow using 4.0 and 12.0 with gyp?
I'm having the exact same problem. Tried to get version 2, got version 12.
Got this as well. Not sure if it has to do with either Windows 10 or Visual Studio RC 2015
I was getting the same error as reported above. Installing the Microsoft Build Tools 2013 from the above links didn't work for me either. It only installed version 12.0, so I still received an error re: version 2.0. Fortunately, its working now after I upgraded Node to the latest build (12.7). I was running 10.38 before.
i have the same problem,when i intsall msbt 2013,it doen't work .
how do you reslove?
@bchintx
@javruben @nicolasximenes
I can also attest to this error. On Windows 10 x64, I see MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "12.0", "14.0", "4.0".
Installing the latest msbuild toolkits got me the 12.0 and 14.0 options. Looking at my Windows/Microsoft.Net folder, it looks like I have every 32 bit .NET version known to man, but only .NET 4 in 64 bit. Maybe that could help lead to a solution?
thanks,i reslove it by add --msvs_version=2013 . @shawmanz32na
@TNT-Likely Where did you add the --msvs_version switch? I'm encountering this error way down the chain of a yeoman generation, and don't know where I can specify the switch...
For those of us following along that are encountering this error deep down in an NPM call, you can use npm config set msvs_version 2012 --global
to tell NPM to always use a different MSVS version. Thanks goes to http://stackoverflow.com/a/22411007/1342760
good
@TNT-Likely
i reslove it by add --msvs_version=2013
Where did you add it to? To your morning smoothie? Express your ideas more precise, please
@shawmanz32na
Didn't work for me
error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found.
open up a new cmd as administrator and run this command:
npm install --global --production windows-build-tools
then
npm config set msvs_version 2015 --global
close all instances of shell/cmd, reopen a cmd (regular this time, non-administrator) return to your directory where you are trying to run npm install and run it again
For anyone using Yarn, the above comment worked for me after running the same command with Yarn.
So, for anyone skimming:
$ npm install --global --production windows-build-tools
$ yarn config set msvs_version 2015 --global
FYI pty.js has been forked into https://github.com/Tyriar/node-pty, you can check out the improvements made on the releases page (v0.4.1 was the first release).
Thanks for the suggestions @mokanfar . Your solution resolved my issue.
mokanfar, it`s helped me! Thanks
thank you all
wow saved my day! Thanks
Thanks All Of you for save my day
Thanks All
just run npm install --global --production windows-build-tools
@mokanfar 's comment helped to fix one error, but another showed up:
... fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory (compiling source file ..\src\CanvasGradient.cc) ...
EDIT: fixed by doing a manual install.
Open cmd with administrator and write this command: npm install --global --production windows-build-tools