TRACKER:错误TRK0005:找不到:“CL.exe”

时间:2017-08-01 11:03:01

标签: c++ node.js npm-install node-gyp

我觉得我已经尝试了一切。

  • 我已经安装并卸载了每个版本的Visual 工作室(2010年至2017年)

  • 我试图安装用于windows c ++的构建工具

  • 我已卸载node.js并重新安装。

但无论我做什么,我仍然会收到错误:

TRACKER : error TRK0005: Failed to locate: "CL.exe".

我尝试了google上可以找到的讨论或描述此问题的每个“解决方案”。

当我运行npm install

我收到以下错误:

    TRACKER : error TRK0005: Failed to locate: "CL.exe". file not found


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:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.15063
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:\xampp\htdocs\myproject\src\node_modules\node-expat
gyp ERR! node -v v6.11.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
learningbank@1.0.0 C:\xampp\htdocs\myproject\src
`-- (empty)

有谁能告诉我如何解决这个问题?

我的操作系统是“Windows 10 pro”。

5 个答案:

答案 0 :(得分:3)

CL.exe是VS的命令行构建。我会看一些事情:

  1. 当您安装VS时,CL安装是可选的,如果是这样的话吗?
  2. 环境变量。请参阅https://msdn.microsoft.com/en-us/library/kezkeayy.aspx

答案 1 :(得分:2)

确保"平台工具集",在项目属性>下;常规设置,设置为您正在使用的正确Visual Studio版本。

在我的情况下,从GitHub下载了一个设置为Visual Studio 2015的项目,我使用的是VS 2017.更改后的工作。

您可能还希望确认属性下的其他设置,如" Windows SDK版本",并确保已安装它。您可以在"应用程序&中查看Visual Studio安装。特征"并修改。

答案 2 :(得分:1)

我尝试安装Visual Studio 2015.但是,我看到了这个错误。后来我发现我必须选择自定义安装,在安装过程中选择Visual C ++。

答案 3 :(得分:0)

今天,在构建新的“ Hello World”控制台应用程序时遇到了类似的问题。我浏览了Microsoft.Cpp.Win32.user的属性页(视图-其他Windows-属性管理器)。在“公用属性-VC ++目录-可执行目录”中,未选中“从父级或项目默认值继承”。检查发现cl.exe后。

答案 4 :(得分:0)

我有同样的问题。当我使用Visual Studio 2015而不是2019时,此问题已解决,并将Windows SDK版本从10.0更改为8.1。

相关问题