【问题标题】:VSTFS build failed at Publish stepVSTFS 构建在发布步骤失败
【发布时间】:2022-01-17 06:57:36
【问题描述】:

我正在使用 VSTFS CI/CD 管道通过 Angular 12 Web 应用程序自动化我的 .NET Core 5.0。

它在发布步骤中构建失败(见下面的屏幕截图)并出现错误:

'npm' is not recognized as an internal or external command,
2021-12-13T20:19:46.9855025Z   operable program or batch file.
2021-12-13T20:19:46.9917349Z D:\TFSBuildAgent\_work\58\s\src\WebUI\WebUI.csproj(85,5): error MSB3073: The command "npm install" exited with code 9009.
2021-12-13T20:19:47.0482106Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
2021-12-13T20:19:47.0496257Z ##[error]Dotnet command failed with non-zero exit code on the following projects :

可能是什么问题?

谢谢

【问题讨论】:

    标签: azure-devops continuous-integration azure-pipelines-build-task asp.net-core-5.0


    【解决方案1】:

    代理似乎找不到npm。确保 Node 已全局安装在机器上,并且 npm 已添加到系统范围的路径环境变量中。

    或者将 Node Tool Installer 任务添加到您的工作流中。

    【讨论】:

      【解决方案2】:

      我通过删除 WebUI 项目文件中的 npm 发布标签解决了这个问题。

      【讨论】:

        猜你喜欢
        • 2023-04-04
        • 2020-04-09
        • 1970-01-01
        • 1970-01-01
        • 2019-05-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-05-10
        相关资源
        最近更新 更多