reactjs - 在 gitlab-ci 上构建反应应用程序时出错
问题描述
当我在本地构建时,我正在尝试使用 GitLab-ci 部署一个反应应用程序,它工作正常,但是在管道上构建时,我在构建完成之前收到错误:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! spinspace-admin@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the spinspace-admin@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-05-20T18_07_19_210Z-debug.log
Running after_script
00:01
Uploading artifacts for failed job
00:02
ERROR: Job failed: exit code 1
这是我的 GitLab-ci.yaml 中的 before_script
before_script:
- apt-get update
- npm install
- npm run build
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- mkdir -p ~/.ssh
- eval $(ssh-agent -s)
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
请问我需要帮助...
解决方案
推荐阅读
- r - lavaan - WLSMV 估计器的问题
- php - php下单成功后的库存管理
- powershell - 使用 Powershell 在 W10 中创建新的本地用户帐户但不填充前端
- javascript - 反应 | DataGrid 不会随着更改的状态而更新
- google-bigquery - bigquery 中的任何等效于 postgres any() 数组?
- twilio - 为单个 Twilio 号码注册多个 webhook
- javascript - 在 HTML 输入中动态地将元素环绕在文本周围
- go - 你如何安装子命令?
- mongodb - Mongoose - 使用任何键和特定子键查找对象
- java - 保存并重新使用这个“随机”?