Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified

I'm trying to execute the following command in a Node.js project on Windows 8:

npm install [email protected]

But I'm gettig an error that I have node idea how to deal with.

TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Projects\myproject\node_modules\scrypt\build\copied_files.vcxproj]

Here is the entire output:

[email protected] preinstall C:\Projects\myproject\node_modules\scrypt node node-scrypt-preinstall.js

[email protected] install C:\Projects\myproject\node_modules\scrypt node-gyp rebuild

C:\Projects\myproject\node_modules\scrypt>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-g yp.js" rebuild ) else (node "" rebuild ) Warning: Missing input files: C:\Projects\myproject\node_modules\scrypt\build..\scrypt\win\include\config.h 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.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\Projects\myproject\node_modules\scrypt\build\copied_files.vcxproj] Copying scrypt/win/include/config.h to scrypt/scrypt-1.2.0/config.h The system cannot find the file specified. TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Projects\myproject\node_modules\scrypt\build\copied_files.vcxproj]

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [C:\Projects\myproject\node_modules\scrypt\build\scrypt_wrapper.vcxproj] TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Projects\myproject\node_modules\scrypt\build\scrypt_wrapper.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:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Windows_NT 6.2.9200 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 C:\Projects\myproject\node_modules\scrypt gyp ERR! node -v v8.9.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm 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 probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\user\AppData\Roaming\npm-cache_logs\2017-11-13T01_31_12_133Z-debug.log

Help!

like image 714
Alon Avatar asked Nov 13 '17 01:11

Alon


People also ask

How do I know if CL EXE is installed?

You can test that you have the C++ compiler, cl.exe , installed correctly by typing 'cl' and you should see a copyright message with the version and basic usage description.

Where is Cl EXE stored?

cl.exe is usually located at %VCINSTALLDIR%\bin\ . VCINSTALLDIR environment variable is not set by default, but it is being set when you open Visual Studio's Native Tools Command Prompt.

Is MSVC compiler free?

Microsoft Visual C++ Microsoft Visual C++ (MSVC) is a compiler for the C, C++ and C++/CX programming languages by Microsoft. MSVC is proprietary software; it was originally a standalone product but later became a part of Visual Studio and made available in both trialware and freeware forms.


1 Answers

This packages seems to be requiring native compiling. You need to install Visual Studio C++ Build Tools for the same. You can download the same from below link

http://landinghub.visualstudio.com/visual-cpp-build-tools

Also after that you need to make sure that CL.exe is available in your path. It would be on a path like C:\Program Files\Microsoft Visual Studio 10.0\VC\ce\bin. This would change based on the version of build tools you have installed.

You will need to make sure to update your Windows PATH environment variable if the setup doesn't do that for you.

Also if npm still fails, you can always try using yarn

yarn add [email protected]
like image 180
Tarun Lalwani Avatar answered Sep 21 '22 01:09

Tarun Lalwani