I am trying to deploy a react app using GitLab-ci when I build on local it works fine but when building on the pipeline I get the error just before the build complete:
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
This is the before_script in my GitLab-ci.yaml
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'
please I need help...