Jenkins-npm-构建报错

Jenkins-npm-构建报错

jenkins npm 编译报错,手工构建成功

问题排查

解决办法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
## 构建脚本加上CI=false
export CI=false
yarn install
npm run build

## 或者代码加上CI=false
# package.json

"scripts": {
"start": "craco start",
"build": "CI=false && craco build",
"test": "craco test",
"eject": "react-scripts eject",
"lint": "eslint .",
"lint:fix": "eslint --fix",
"format": "prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc"
},