【发布时间】:2019-10-10 03:28:02
【问题描述】:
我是新手,正在尝试设置新的 Jenkins 构建服务器,并且正在尝试自动化节点插件 api 项目。即使我尝试在 cmd 提示符下运行 node-gyp,我也仅在 Jenkins 服务器上遇到以下问题,它工作正常。
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\jenkins_builds\Reporter-Backend\workspace\build\copy_binary.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\jenkins_builds\Reporter-Backend\workspace\node_modules\node-addon-api\src\nothing.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
Node version v10.15.3
Node-Gyp v4.0.0
Jenkins v2.164.3
Visual Studio 2019
我尝试设置环境路径以及在 Gyp 文件中设置正确的 msbuild 路径。但在 Jenkins 中,每次构建都会因上述问题而失败。
在此先感谢您。
【问题讨论】:
标签: node.js jenkins msbuild node-gyp visual-studio-2019