Skip to content

Fix CI: pin Node 24 and install frontend deps with npm ci#1571

Merged
KodeStar merged 1 commit into
2.xfrom
fix/ci-node-select2
Jul 8, 2026
Merged

Fix CI: pin Node 24 and install frontend deps with npm ci#1571
KodeStar merged 1 commit into
2.xfrom
fix/ci-node-select2

Conversation

@KodeStar

@KodeStar KodeStar commented Jul 8, 2026

Copy link
Copy Markdown
Member

Problem

CI (ci.yml) has been red since ~Nov 2025 on every PR. It ran yarn && yarn dev with no committed yarn.lock, so each run resolved the latest matching versions and dependency drift broke the pipeline two ways:

  1. select2 4.1.0 added engines.node ">=24", but the runner used Node 22 → yarn install failed outright.
  2. webpack 5.108 removed lib/SizeFormatHelpers, which laravel-mix@6 still require()s → yarn dev would 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

  • Install with npm ci, which uses the exact versions already pinned in the committed package-lock.json (select2 4.0.13, webpack 5.100.1) instead of floating to latest.
  • Pin the runner to Node 24 via actions/setup-node@v4 (with npm caching) so the toolchain is explicit.
  • Pin select2 to ~4.0.13 in package.json so a future npm install can't reintroduce the Node-24-only 4.1.0.

webpack stays at 5.100.1 because laravel-mix@6 (unmaintained) requires the removed SizeFormatHelpers; a longer-term fix is migrating the asset pipeline off laravel-mix.

Verification

Locally with the locked versions: npm cinpm run dev compiles successfully and npm run lint passes clean, on Node 24. Once merged, the other open PRs go green on re-run.

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.
@KodeStar KodeStar merged commit e2215fe into 2.x Jul 8, 2026
2 checks passed
@LinuxServer-CI LinuxServer-CI moved this from PRs to Done in Issue & PR Tracker Jul 8, 2026
@KodeStar KodeStar mentioned this pull request Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants