From f2a0695b84de16f64e89da702ce771999559ac14 Mon Sep 17 00:00:00 2001 From: Chandran Date: Mon, 8 Jun 2026 22:51:24 +0200 Subject: [PATCH] fix(ci): bump Node to 22 for Vite 8 (dist rebuild workflow + Space Dockerfile) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A Dependabot PR bumped the repo to Vite 8 (build(deps-dev): bump vite 5→8), which requires Node ^20.19.0 || >=22.12.0. Two build pipelines were still pinned to Node 18, so `npm run build` fails on both: - .github/workflows/build_frontend.yml — the "Rebuild frontend/dist" workflow. Its build failed silently, so the committed frontend/dist stopped being regenerated and the shipped bundle fell behind the merged source (e.g. the PR #21 calibration UI never reached dist). - frontend/Dockerfile — the image the Hugging Face Space builds. Its `npm run build` step fails, so the Space shows a build error. Bump both to Node 22. The rebuild workflow also triggers on changes to its own file, so merging this re-runs it and regenerates dist from the current source. --- .github/workflows/build_frontend.yml | 4 +++- frontend/Dockerfile | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_frontend.yml b/.github/workflows/build_frontend.yml index b745ab65..fb6ca755 100644 --- a/.github/workflows/build_frontend.yml +++ b/.github/workflows/build_frontend.yml @@ -23,7 +23,9 @@ jobs: persist-credentials: false - uses: actions/setup-node@v6 with: - node-version: '18' + # Vite 8 requires ^20.19.0 or >=22.12.0; on Node 18 `npm run build` + # fails, which silently stops dist from being rebuilt. + node-version: '22' cache: 'npm' cache-dependency-path: frontend/package-lock.json - name: Install diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 2102ca14..25d53109 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,4 +1,6 @@ -FROM node:18-alpine +# Vite 8 requires Node ^20.19.0 or >=22.12.0; on Node 18 `npm run build` fails, +# which is what breaks the Hugging Face Space build. +FROM node:22-alpine # Use the existing node user (usually UID 1000) # Set up environment variables for the node user