You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like it doesn't cache all modules for me, and npm install requires "a peer of @babel/core@^7.0.0-0 but none is installed". Consequently, webpack build fails.
The solution for me was to NOT use CodeBuild local caching, but instead use S3 caching mode. Not sure if this applies to your own situations, but hoping this helps someone else.
@josephvusich ,
still facing issues while trying to cache node_modules inside the buildspec.yml file.
I am trying to use codebuild local caching and it doesn't seem to work.
any suggestions??
@josephvusich ,
still facing issues while trying to cache node_modules inside the buildspec.yml file.
I am trying to use codebuild local caching and it doesn't seem to work.
any suggestions??
Hi @AditModi - just wanted to say I came here for exactly this. If you find a solution, please post here. I'll do the same.
Anyone have a issue where it states "Uploading S3 cache..." and times out?
I've gone over and over it and I can't figure out why it can't status an error. I've reviewed all the policy and the Source writes fine but anytime I add a cache or artifact it just hangs.
I've been trying Codebuild with both s3 and local caching since before November... Eventually, I reached out to support from a federated work account. This was the last response.
Thank for the reaching out. As per your response, I understand that you were able to successfully use caching with Github Actions which it takes less than 6 min to build while your existing CodeBuild still takes ~14min to build.
I regret the inconvenience that this may have been causing you. I have added this points to the Service Team who are currently working on your case on priority and I will soon update you with the workaround, if any.
So, now we use Github actions for testing the integrity of our builds, and allow a very slow AWS build time for env promotion.
Thanks @joshhoegen I ended up removing the ‘node_modules/**/*’ and the hang time ended. I used pnpm on this project so I tweaked how that whole thing would work but still tuning. Least it finally let the lint, test jobs run built in < 6 minutes.
phases:
install:
commands:
- n 14.19.0
- echo Installing source NPM dependencies...# This project uses angular/cli and pnpm. "aws/codebuild/standard:5.0" comes with Node 14
- npm install -g @angular/[email protected][email protected]
- pnpm config set store-dir .pnpm-store
- npm config -g set prefer-offline true
- npm config -g set cache /root/.npm
- npm config get cache```
my understanding is that it removes symlinks, so if you delete node_modules/.bun then bun will just recreate them, otherwise it will assume they are there
Activity
josephvusich commentedon Feb 27, 2019
We're investigating this issue, thanks for bringing it to our attention.
dashmug commentedon Feb 27, 2019
@josephvusich Thanks for looking into it.
josephvusich commentedon Mar 14, 2019
This issue should now be resolved. Let us know if you continue to experience problems.
dashmug commentedon Mar 14, 2019
Thank you very much.
MrStarktastic commentedon Apr 17, 2019
Seems like it doesn't cache all modules for me, and
npm installrequires "a peer of @babel/core@^7.0.0-0 but none is installed". Consequently, webpack build fails.mparent61 commentedon Sep 26, 2019
Having same issue using latest CodeBuild v2.0 image and "node 10" runtime installed. Build works fine with caching disabled.
jeanlks commentedon Apr 23, 2020
The same with me, even tried with recursive folders.
mparent61 commentedon Apr 23, 2020
The solution for me was to NOT use CodeBuild local caching, but instead use S3 caching mode. Not sure if this applies to your own situations, but hoping this helps someone else.
AditModi commentedon Apr 6, 2021
@josephvusich ,
still facing issues while trying to cache node_modules inside the buildspec.yml file.
I am trying to use codebuild local caching and it doesn't seem to work.
any suggestions??
christianaranda commentedon Apr 18, 2021
Hi @AditModi - just wanted to say I came here for exactly this. If you find a solution, please post here. I'll do the same.
soplan commentedon Sep 15, 2021
same issue for us. Using S3 as cache. yet in the logs I can see that it fetches packages every time...
joshhoegen commentedon Nov 18, 2021
@mparent61, I've been trying the same, but have the same result as @soplan... any tips?
mparent61 commentedon Nov 22, 2021
@joshhoegen - Not sure what you're missing, but I can just give you my basic approach in case this helps -
My
aws_codebuild_projectTerraform config sets up S3 cache -I make sure the CodeBuild role can read/write to that bucket, and my buildspec is roughly -
cybercussion commentedon May 24, 2022
Anyone have a issue where it states "Uploading S3 cache..." and times out?
I've gone over and over it and I can't figure out why it can't status an error. I've reviewed all the policy and the Source writes fine but anytime I add a cache or artifact it just hangs.
joshhoegen commentedon May 25, 2022
I've been trying Codebuild with both s3 and local caching since before November... Eventually, I reached out to support from a federated work account. This was the last response.
So, now we use Github actions for testing the integrity of our builds, and allow a very slow AWS build time for env promotion.
cybercussion commentedon May 25, 2022
Thanks @joshhoegen I ended up removing the ‘node_modules/**/*’ and the hang time ended. I used pnpm on this project so I tweaked how that whole thing would work but still tuning. Least it finally let the lint, test jobs run built in < 6 minutes.
mimoo commentedon Feb 19, 2026
my understanding is that it removes symlinks, so if you delete node_modules/.bun then bun will just recreate them, otherwise it will assume they are there