Skip to content

Commit

Permalink
Try moving yarn cache to ./.next/cache/yarn-cache when building on Ve…
Browse files Browse the repository at this point in the history
…rcel (#3480)

<!--
PR title: GRW-123 / Feature / Awesome new thing
-->

## Describe your changes

Move yarn cache outside node_modules, see vercel/turbo#785

<!--
What changes are made?
If there are many changes, a list might be a good format.
If it makes sense, add screenshots and/or screen recordings here.
-->

## Justify why they are needed

## Checklist before requesting a review

- [ ] I have performed a self-review of my code
  • Loading branch information
alebedev committed Oct 25, 2023
1 parent 493015e commit 9525db5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ plugins:

yarnPath: .yarn/releases/yarn-3.6.4.cjs

# Make Vercel build cache see yarn cache
# https://vercel.com/docs/deployments/troubleshoot-a-build#what-is-cached
cacheFolder: ./node_modules/.cache/yarn

# Declare missing dependencies to solve 'module not found' errors
packageExtensions:
"@apollo/experimental-nextjs-app-support@*":
Expand Down
2 changes: 1 addition & 1 deletion apps/store/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"framework": "nextjs",
"buildCommand": "cd ../.. && yarn turbo run codegen --filter=store --force && STORYBLOK_CACHE_VERSION=$(node ./apps/store/scripts/storyblok-cache-version.js) yarn turbo run build --filter=store && ./apps/store/scripts/upload-sourcemaps-vercel.sh",
"ignoreCommand": "../../bin/vercel-ignore-step.sh",
"installCommand": "cd ../.. && yarn install --immutable",
"installCommand": "cd ../.. && YARN_CACHE_FOLDER=./.next/cache/yarn-cache yarn install --immutable",
"regions": ["arn1"],
"github": {
"autoJobCancelation": true
Expand Down

1 comment on commit 9525db5

@vercel
Copy link

@vercel vercel bot commented on 9525db5 Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.