Angular CLI:TFS生成步骤中的ng生成警告

问题描述

我有一个尝试通过Azure DevOps构建的有角度的项目。当我在库项目上运行ng build时,会有一些警告

ex(## [错误]警告:自动前缀:D:\ Agent_work \ 1 \ s \ Test \ projects \ test-library \ src \ components \ test.component.css:4:5:起始值具有混合支持,请考虑改用flex-start)

因此,构建步骤失败。该步骤的命令是“ ng build test-library”

TFS中是否有一种方法或ng build上的设置可以忽略这些警告?

解决方法

请在您的任务中添加continueOnError

- task: string  # reference to a task and version,e.g. "VSBuild@1"
  condition: expression     # see below
  continueOnError: boolean  # 'true' if future steps should run even if this step fails; defaults to 'false'
  enabled: boolean          # whether or not to run this step; defaults to 'true'
  timeoutInMinutes: number  # how long to wait before timing out the task
  target: string            # 'host' or the name of a container resource to target

或在这里,如果您使用经典管道: enter image description here

However I would recommend you to get rid of this warning.

,

您可以尝试将justify-content: start属性更改为justify-content: flex-start

enter image description here

有关详细信息,请参阅此document