balena-io-modules / drivelist

List all connected drives in your computer, in all major operating systems
Apache License 2.0
239 stars 90 forks source link

Failed to locate 'CL.exe' when building electron app using drivelist #356

Closed hamiltonjoe closed 4 years ago

hamiltonjoe commented 4 years ago

Running from VSCode does not show this error, only when trying to build and run the electron app. I have included the terminal output and the log that it references.

terminalOutput.txt 2019-11-25T15_39_18_608Z-debug.log

hamiltonjoe commented 4 years ago

The main issue is this line: TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [D:\myappClient\node_modules\drivelist\build\drivelist.vcxproj]

Where is drivelist looking for this executable?

hamiltonjoe commented 4 years ago

The things that helped this was:

  1. Reinstall Visual Studio 2015 and choose Custom Install, Select Visual C++ during the installation.

Then run the follow commands in VSCode terminal:

  1. npm install -global --vs2015 --production windows-build-tools
  2. npm config set msvs_version 2015

Then finally set the environment varible to:

  1. SET VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140
lurch commented 4 years ago

Maybe https://github.com/balena-io/etcher/blob/master/docs/CONTRIBUTING.md#windows helps?