简体   繁体   English

React 的 Azure 管道 npm 构建失败

[英]Azure pipeline npm build failing for React

I have been stuck at this for a while now and similar issues don't seem to help.我已经被困了一段时间了,类似的问题似乎没有帮助。

In Azure DevOps, the pipeline fails at the npm build level.在 Azure DevOps 中,管道在 npm 构建级别失败。

Agent: macOS-10.15代理:macOS-10.15

在此处输入图像描述

Can someone help please.有人可以帮忙吗。

I hope you are using latest macOS-10.15 .我希望您使用的是最新的 macOS-10.15 if not try to use macOS-10.15 or latest .如果不尝试使用macOS-10.15最新的 .

By default, Azure DevOps upgrade the Nodejs runtime without notifying anyone.默认情况下,Azure DevOps 会在不通知任何人的情况下升级Nodejs运行时。 If you are trying to upgrade the Nodejs Make sure to use the latest Nodejs version.如果您正在尝试升级Nodejs ,请确保使用最新的 Nodejs版本。 so that it will be the compatible with your application.以便它与您的应用程序兼容。 In azure you have to specify the recent latest version otherwise it will take the default version在 azure 中,您必须指定最近的最新版本,否则它将采用默认版本

#specify the latest node version.
- task: NodeTool@0
        displayName: Install Node.js
        inputs:
          versionSpec: 'Your node version e.g. 14.x'

Refer here for more information请参阅此处了解更多信息

For anyone looking for a resolution.对于任何寻求解决方案的人。

I managed to fix my issue by creating a new YAML pipeline and for some reason this worked.我设法通过创建一个新的 YAML 管道来解决我的问题,并且由于某种原因这有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM