Reputation: 522
I am trying to npm install
a project that has been successfully built under other dev environment but fails on mine (windows 8.1).
At first I got
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "4.0".
and tried to solve it by installing Visual C++ Build Tools 2015
.
After that, I got
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "14.0", "4.0".
and as per instructions on node-gyp
page, I downloaded Option 1: Install Visual C++ Build Tools using the Default Install option
, installed and run npm install --msvs_version=2015
and below is what it is returned.
The real question is if this is an actual coding error or another problem with node-gyp
and msvs_version
used that seems to trouble many windows users.
Have already tried with multiple suggested ways to fix node-gyp
error but failed.
D:\my_workspace\my_project\my_bundle\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
) else (node "" rebuild )
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.CppCommon.targets(356,5): error MSB6006: "CL.exe" exited with code -1073741515. [D:\my_workspace\my_project\my_bundle\node_modules\bufferutil\build\bufferutil.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:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\my_workspace\my_project\my_bundle\node_modules\bufferutil
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
gyp ERR! Windows_NT 6.3.9600
gyp ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--msvs_version=2015"
gyp ERR! node v4.5.0
gyp ERR! npm v2.15.9
gyp ERR! code ELIFECYCLE
gyp ERR! [email protected] install: `node-gyp rebuild`
gyp ERR! Exit status 1
gyp ERR!
gyp ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
gyp ERR! This is most likely a problem with the bufferutil package,
gyp ERR! not with npm itself.
gyp ERR! Tell the author that this fails on your system:
gyp ERR! node-gyp rebuild
gyp ERR! You can get information on how to open an issue for this project with:
gyp ERR! npm bugs bufferutil
gyp ERR! Or if that isn't available, you can get their info via:
gyp ERR!
gyp ERR! npm owner ls bufferutil
gyp ERR! There is likely additional logging output above.
gyp ERR! Please include the following file with any support request:
gyp ERR! D:\my_workspace\my_project\my_bundle\npm-debug.log
Upvotes: 1
Views: 1846
Reputation: 2305
Install from windows CMD in admin mode this package:
npm install --global --production windows-build-tools
it cointans the proper versions C++ compiler
Upvotes: 1