Reputation: 178
I'm working in a project in angular2 , and now I am using windows 10 . After execute npm install I got this error: MSBUILD : error MSB4132
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "12.0", "14.0", "4.0". 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:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:194:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Windows_NT 10.0.14393 C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\n ode-gyp.js" "rebuild" gyp ERR! cwd C:\Users\wcatalan\Documents\clinica\AppMovilMemoria\tools\Visual Studio Code\MemoriaIonicAuth\node_modules\microtime gyp ERR! node -v v7.10.0 gyp ERR! node-gyp -v v3.5.0 gyp ERR! not ok.
I tried to fix it, installing the "builds tools" of visual studio, but nothing. In windows 7 I never had this error. Any idea?, in this moment everything helps
Upvotes: 13
Views: 35729
Reputation: 1
My issue was that I was using the wrong version of nodejs. I had to install nvm to manage multiple versions of node, then switch to the compatible version (node 14.20.0 in my case).
Upvotes: 0
Reputation: 37896
Try this in Windows Command Prompt with Administrator Privileges:
npm install --global --production windows-build-tools
npm config set msvs_version 2012 --global
How to run PowerShell as Administrator? See below
Upvotes: 0
Reputation: 539
I uninstalled npm and installed an earlier version, specifically this one: https://nodejs.org/download/release/v5.3.0/node-v5.3.0-x64.msi
Upvotes: 1
Reputation: 550
Maybe this can help: https://github.com/nodejs/node-gyp/issues/629#issuecomment-153196245
If not, you can also try to install from windows CMD in admin mode this package:
npm install --global --production windows-build-tools
Upvotes: 27
Reputation: 2319
This chocolatey package solved the problem for me:
https://chocolatey.org/packages/visualstudio2017buildtools
If you already have chocolatey installed then just type:
choco install visualstudio2017buildtools
If you don't:
https://chocolatey.org/install
Upvotes: 8
Reputation: 1995
It's trying to install something that needs to be C++ built using node-gyp. Have you followed the instructions at https://github.com/nodejs/node-gyp for installation on Windows? If not, that would likely fix your issue.
Upvotes: 5