【发布时间】:2021-09-15 09:38:30
【问题描述】:
我正在尝试运行脚本来构建反应应用程序并将其复制到 jenkins 中的部署文件夹,但失败了。
像这样打壳:
npm cache clean --force
npm install
npm run build
rm -rf $DEPLOY_PATH/*
cp -r $WORKSPACE/build/* $DEPLOY_PATH
工作完成后,詹金斯给我这个:
npm 错误!代码生命周期 npm 错误!错误号 1 npm 错误! bimgr@0.1.0 build: `react-scripts build` npm 错误!退出状态 1 npm 错误! npm 错误!在 bimgr@0.1.0 构建脚本中失败。 npm 错误!这可能不是 npm 的问题。上面可能有额外的日志输出。我不明白,该脚本在 windows 11 和 debian 10.9 以及在 debian 10.9 上运行的 jenkins 中测试。为什么只有 jenkins 出现构建错误?
【问题讨论】: