skip to Main Content

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:

build job cicleci

CircleCI configuration file (config.yml):

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:

log file

2

Answers


  1. Chosen as BEST ANSWER

    I recognize that I put package-lock.json in .gitignore so I remove it then I add npm cache clean --force before npm install of the frontend and it works fine. Thanks a lot for @Top-Master


  2. Your CircleCI instance seems to be out of:

    • RAM
    • Or even Storage

    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 same package-lock.json file (maybe by tracking it in Git).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search