首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >错误TRK0005:找不到:"CL.exe“

错误TRK0005:找不到:"CL.exe“
EN

Stack Overflow用户
提问于 2015-11-15 12:20:07
回答 4查看 48.1K关注 0票数 26

我使用的是Windows 8.1。我安装了Visual Studio 2015社区版。当我运行npm install -g生成器keystone时,我在底部得到错误。我尝试运行以下命令,但仍然得到相同的结果。

代码语言:javascript
运行
复制
set GYP_MSVS_VERSION=2015
npm config set msvs_version 2015 --global


C:\Users\user\AppData\Roaming\npm\node_modules\generator-keystone\node_modules\buffertools>if not defined npm_config_no
de_gyp (node "C:\Users\user\AppData\Roaming\npm\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.CppBuild.targets(366,5): warning MSB8003: Could not fi
nd WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid versio
n number. [C:\Users\user\AppData\Roaming\npm\node_modules\generator-keystone\node_modules\buffertools\build\buffertool
s.vcxproj]
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\user\AppData
\Roaming\npm\node_modules\generator-keystone\node_modules\buffertools\build\buffertools.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:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib
\build.js:270: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 (x86)\\nodejs\\node.exe" "C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm
\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\user\AppData\Roaming\npm\node_modules\generator-keystone\node_modules\buffertools
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:buffertools@2.1.3 buffertools@2.1.3 install: `node-gyp rebuild`
npm WARN install:buffertools@2.1.3 Exit status 1
C:\Users\user\AppData\Roaming\npm
├── generator-keystone@0.3.9
└── UNMET PEER DEPENDENCY yo@>=1.0.0
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2015-11-15 12:57:00

我进入Visual Studio并创建了一个Visual C++项目,该项目安装了几个库。npm安装在那之后就开始工作了。

票数 69
EN

Stack Overflow用户

发布于 2020-03-25 09:20:10

我去了\Users\[my-user]\.windows-build-tools - VS构建工具的安装文件在那里( 2017年是vs_BuildTools.exe),我运行并安装了它。

之后,我运行了npm install --global --production windows-build-tools (来自here的“选项1”)。

然后它就成功了。

票数 6
EN

Stack Overflow用户

发布于 2020-05-01 09:59:41

我使用的是visual basic 2019最新版本。无法使用工具集140运行项目。安装后会弹出消息TRK0005: Failed to locate: CL.exe。我把它改成142,它就起作用了。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33716369

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档