gpt4 book ai didi

azure - VSTS/Azure DevOps 在 "npm install"上失败

转载 作者:行者123 更新时间:2023-12-03 14:56:36 24 4
gpt4 key购买 nike

我们有一个在 Azure DevOps (VSTS) 中运行“NPM 安装”任务的构建。

日志中的错误:

2018-11-30T11:13:20.3544084Z ##[debug]Agent.BuildDirectory=D:\a\1
2018-11-30T11:13:20.3544294Z ##[debug]rm -rf D:\a\1\npm
2018-11-30T11:13:20.3544390Z ##[debug]removing directory
2018-11-30T11:13:20.3544478Z ##[debug]task result: Failed
2018-11-30T11:13:20.3597315Z ##[error]Error: Npm failed with return code: 1
2018-11-30T11:13:20.3606909Z ##[debug]Processed: ##vso[task.issue type=error;]Error: Npm failed with return code: 1
2018-11-30T11:13:20.3608689Z ##[debug]Processed: ##vso[task.complete result=Failed;]Error: Npm failed with return code: 1

似乎无法删除文件夹“D:\a\1\npm”

即使是曾经成功的构建现在也不断失败(上次成功构建是在 2018 年 11 月 27 日)。我们正在代理池“Hosted VS2017”上运行。

还有其他人在 Azure DevOps/VSTS 中遇到类似的情况吗?

编辑:该步骤的 yml:

steps:
- task: Npm@1
displayName: 'npm install'
inputs:
workingDir: web/
verbose: true

Picture of pipeline in Azure DevOps

编辑2:当“NPM Install”作为 Buils 中的第一个任务运行时,它也会失败:

2018-11-30T14:13:49.0617793Z ##[debug]Agent.BuildDirectory=D:\a\1
2018-11-30T14:13:49.0617936Z ##[debug]rm -rf D:\a\1\npm
2018-11-30T14:13:49.0618038Z ##[debug]removing directory
2018-11-30T14:13:49.0618144Z ##[debug]task result: Failed
2018-11-30T14:13:49.0671864Z ##[error]Error: Npm failed with return code: 1

最佳答案

这可能与 Azure DevOps 尝试执行 rm -rf D:\a\1\npm 无关.

您有任何 npm 错误消息吗?当这对我们来说失败时,我们的错误消息是:

2018-11-27T07:10:16.3177900Z 8080 error code ELIFECYCLE
2018-11-27T07:10:16.3177998Z 8081 error errno 1
2018-11-27T07:10:16.3178126Z 8082 error <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f790858794b7c6d9c6c4d9c6" rel="noreferrer noopener nofollow">[email protected]</a> install: `node-pre-gyp install --fallback-to-build --library=static_library`
2018-11-27T07:10:16.3178257Z 8082 error Exit status 1
2018-11-27T07:10:16.3178367Z 8083 error Failed at the <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1c7b6e6c7f5c2d322d2f322d" rel="noreferrer noopener nofollow">[email protected]</a> install script.

关于azure - VSTS/Azure DevOps 在 "npm install"上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53556624/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com