设置CI-自动构建作业将挂起,然后在我们通过以下方式在应用程序中导入CSS文件时,构建步骤失败 导入“ ../ resoures / fonts / style.css”
在以下情况下,build命令成功执行:
CSS导入
import type { Node } from "react";
import { Router } from "@reach/router";
import { Login } from "./pages/login";
import "../resources/fonts/style.css";
type Props = {};
export default class App extends React.Component<Props> {
render(): Node {
return (
<Router>
<Login path={"/"} />
</Router>
);
}
}
CircleCI config.yml
jobs:
build:
docker:
- image: "circleci/node:8"
working_directory: ~/repo
steps:
- checkout
- run: "npm install"
- run: # run linter
name: lint
command: npm run lint
- run: # run flow
name: flow
command: npx flow
- run: # run tests
name: tests
command: npm test
- run: # run build
name: build
command: npm run build
CI作业中的错误消息(带有CSS导入)
>parcel build index.html
Too long with no output (exceeded 10m0s)"
答案 0 :(得分:0)
Circle CI在闲置10分钟后停止了运行步骤。这意味着如果在此期间未将任何输出写入控制台,则作业将被取消并标记为失败。但是,您可以使用 no_output_timeout 配置选项来自定义此阈值。
jobs:
build:
...
steps:
...
- run: # run build
name: build
command: npm run build
no_output_timeout: 60m
有关更多信息,请参见文档:https://circleci.com/docs/2.0/configuration-reference/#run