node gyp error TRACKER : error TRK0005: Failed to locate: “CL.exe”. The system cannot find the file specified

淺唱寂寞╮ 提交于 2019-11-29 18:55:03
Raz Omessi

I had the same problem with another module.

I solved it by:

  • Install visual studio community 2013
  • Run npm config set msvs_version 2013 --global
  • Run npm install bcrypt

Easily, I fixed this issue by simply creating C++ project in VS2015.

Basically, when u choose to create a c++ project, VS2015 will ask you to install a certain component, you just let it install. The issue will get fixed. (BTW, I am using VS2015 on Win10)

I had a problem installing karma (npm module). I installed Visual c++ from visual studio 2015 install and it worked.

I had a similar problem while building a typical hello_world.c console application. The reason was that I decided to install VS2015 to "C:\program files (x86)\msvc14", but the installer installed cl.exe to the default "c:\program files (x86)\Microsoft Visual Studio 14.0" path. Which is obviously a serious bug in the setup program.

I merged all the content of "Microsoft Visual Studio 14.0" into the "msvc14" directory, and now all works fine.

Putting this here in case someone has the same issue:

I already had the C++ libraries installed.

Updating Node worked for me.

I assume the older version of node just didn't support my VS2017.

Just gonna drop this here in case someone needs this to work with VS 2017 and ethereum web3.js. I faced this problem when installing web3.js

  1. Update Node.js to 8.11.1
  2. Create a Visual C++ Project in VS 2017, and make sure it built succesfully
  3. Set the config msvs_version

    npm config set msvs_version 2017 --global

  4. then npm install web3 -g --save

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!