Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

CI: rebuild node_modules from the bun store on install (#79644)

Romeo Van Snick518ca39d5618
diff --git a/.github/actions/prepare-frontend/action.yml b/.github/actions/prepare-frontend/action.yml
index 0c6a8c6a731..c6156adaf14 100644
--- a/.github/actions/prepare-frontend/action.yml
+++ b/.github/actions/prepare-frontend/action.yml
@@ -53,7 +53,13 @@ runs:
# If a job wants to patch packages, it does so explicitly in the CI. This setting is opt-out.
# For example, we never want to cache node_modules with patches already applied so cache-generator.yml skips that step.
- name: Clean install
- run: bun install --frozen-lockfile
+ # Remove the restored node_modules before installing. The os-week cache can
+ # carry a stale tree (for example a different React major), and
+ # `--frozen-lockfile` alone does not prune it. Rebuilding from the cached bun
+ # store gives an exact, lockfile-correct node_modules with no extra download.
+ run: |
+ rm -rf node_modules
+ bun install --frozen-lockfile
shell: bash
- name: Patch frontend dependencies
if: inputs.apply-patches == 'true'