Fix CI: pin Node 24 and install frontend deps with npm ci#1571
Merged
Conversation
CI ran `yarn && yarn dev` with no committed yarn.lock, so every run resolved the latest matching versions and dependency drift broke the pipeline in two independent ways: - select2 4.1.0 added engines.node ">=24" but the runner used node 22, so `yarn install` failed outright on every pull request. - webpack 5.108 removed lib/SizeFormatHelpers, which laravel-mix 6 still requires, so `yarn dev` would have failed the build regardless of node. Switch the workflow to `npm ci`, which installs the exact, known-good versions already pinned in package-lock.json (select2 4.0.13, webpack 5.100.1) and is verified to build and lint cleanly. Pin the runner to node 24 via actions/setup-node so the toolchain is explicit rather than tracking the runner default. Also pin select2 to ~4.0.13 in package.json so a future `npm install` cannot pull the incompatible 4.1.0 back in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CI (
ci.yml) has been red since ~Nov 2025 on every PR. It ranyarn && yarn devwith no committedyarn.lock, so each run resolved the latest matching versions and dependency drift broke the pipeline two ways:select24.1.0 addedengines.node ">=24", but the runner used Node 22 →yarn installfailed outright.webpack5.108 removedlib/SizeFormatHelpers, whichlaravel-mix@6stillrequire()s →yarn devwould fail the build regardless of Node version.This is pre-existing infra drift, unrelated to any feature PR — it fails identically on all of them.
Change
npm ci, which uses the exact versions already pinned in the committedpackage-lock.json(select2 4.0.13, webpack 5.100.1) instead of floating to latest.actions/setup-node@v4(with npm caching) so the toolchain is explicit.select2to~4.0.13inpackage.jsonso a futurenpm installcan't reintroduce the Node-24-only 4.1.0.webpackstays at 5.100.1 becauselaravel-mix@6(unmaintained) requires the removedSizeFormatHelpers; a longer-term fix is migrating the asset pipeline off laravel-mix.Verification
Locally with the locked versions:
npm ci→npm run devcompiles successfully andnpm run lintpasses clean, on Node 24. Once merged, the other open PRs go green on re-run.