I have an AWS S3 bucket to host an angular app.
The S3 bucket works fine with AWS CLI. But the build app job in CircleCI fails!
NOTE: I can build the app locally and then deploy it to the s3 bucket successfully.
S3 has public access, the bucket policy for public read access, and has been enabled to host an index.html
.
Failed job in CircleCI to build the angular app:
CircleCI configuration file (config.yml
):
The npm run frontend:build
command runs ng build
to create the www
folder and then deploys the app.
This is what I got at the end of the big output file in CircleCI:
2
Answers
I recognize that I put package-lock.json in .gitignore so I remove it then I add
npm cache clean --force
beforenpm install
of the frontend and it works fine. Thanks a lot for @Top-MasterYour CircleCI instance seems to be out of:
Simply increase both temporarily, by 1 or 2 GB each, to see if that fixes the issue.
Normally there should be no caching in CI, but if your’s has, also try to clear cache with commands mentioned at:
https://stackoverflow.com/a/49505612/8740349
Also, above link suggests re-creating
package-lock.json
, but as your local works, ensure CI uses samepackage-lock.json
file (maybe by tracking it in Git).