我正在尝试使用 Azure 运行管道,在构建时,它失败并出现以下错误:
当我在nx affected --target=build --base=origin/master --prod --parallel
本地运行命令时,我也有Another process...
消息,但它没有显示为允许构建继续的错误。但是在 Azure 上它只是失败了:(
知道如何解决这个问题吗?谢谢
我正在尝试使用 Azure 运行管道,在构建时,它失败并出现以下错误:
当我在nx affected --target=build --base=origin/master --prod --parallel
本地运行命令时,我也有Another process...
消息,但它没有显示为允许构建继续的错误。但是在 Azure 上它只是失败了:(
知道如何解决这个问题吗?谢谢
这是 NGCC 运行方式的一个已知问题,您可以在此处参考:
并将其添加到您的 package.json 文件中作为解决方法:(在脚本部分中)
"postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points",
它似乎也使用 --parallel 标志阻塞。尝试放弃它。
经过进一步调查,我发现问题出在 powershell 上。
这是我使用的 yaml 代码:
- task: PowerShell@2
displayName: 'Running build'
inputs:
targetType: 'inline'
script: 'npm run nx affected -- --target=build --base=origin/master --prod --parallel'
看起来 Powershell 退出了这个错误,这似乎不是 cmd.exe 或 pwsh 的情况。这是有效的版本:
- pwsh: 'npm run nx affected -- --target=build --parallel --base=origin/master --prod'
displayName: 'Running build'