-
Notifications
You must be signed in to change notification settings - Fork 0
Description
fix(ci): fix check-node.yml matrix incompatibility with engine-strict=true
| β±οΈ Estimate | π Priority | π Size | π Start | π End |
|---|---|---|---|---|
| 1h | P0 | S | 12-03-2026 | 12-03-2026 |
πΈ Screenshots
| Current | Expected |
|---|---|
![]() |
N/A β This change has no visual impact. |
π Summary
- No
.noderc.jsonexists in this repo - Add
deploy.ymltoupdate-node-npm.ymlautomated workflow - Fix
check-node.ymlmatrix from[22, 24]to[24.14.0] - Update
update-node-npm.ymlto propagate exact versions
π‘ Why this bug?
Caution
Run npm install
npm error code EBADENGINE
npm error engine Unsupported engine
npm error engine Not compatible with your version of node/npm: vue-editor@3.5.0
npm error notsup Not compatible with your version of node/npm: vue-editor@3.5.0
npm error notsup Required: {"node":"24.14.0","npm":"11.9.0"}
npm error notsup Actual: {"npm":"10.9.4","node":"v22.22.0"}
npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2026-03-12T06_44_04_160Z-debug-0.log
Error: Process completed with exit code 1.- No
.noderc.jsonexists in this repo, but if it did, theupdate-node-npm.ymlworkflow would not be able to update to newer LTS versions because.noderc.jsonsetsmaxMajorVersion, restricting updates to that major version - The
deploy.ymlwas never included in theupdate-node-npm.ymlautomated workflow, leaving itsnode-versionoutdated at20.x check-node.ymltests[22, 24]causing release(3.5.0): license, configuration and dependency improvementsΒ #891 to fail CI withEBADENGINEerrors on Node 22. Reducing to[24]still fails becauseengine-strict=truerequires exactly24.14.0
β Expected behavior
update-node-npm.ymlupdates all workflow files (includingdeploy.yml) to the latest LTS version without restrictions- CI passes with a single Node version matching
engines.node
π Steps
Phase 0: Verify next LTS compatibility
N/A β No .noderc.json exists in this repo and the project is already running on Node 24. If a .noderc.json existed with a maxMajorVersion restriction, the next LTS version should be tested before removing it:
- Switch to the next LTS:
nvm install <next-lts>
nvm use <next-lts>- Run install:
npm install- Run build:
npm run build- Run dev:
npm run devPhase 1: Remove maxMajorVersion restriction
N/A β No .noderc.json exists in this repo. If it did and no maximum version restriction is needed, it should be deleted so the update-node-npm.yml workflow can update to the latest LTS version freely:
rm .noderc.json- {
- "maxMajorVersion": 22
- }Phase 2: Add deploy.yml support to update-node-npm.yml
- Add
deploy.ymlto the header comment inupdate-node-npm.yml:
# Files updated by this workflow:
# - .nvmrc
# - package.json (engines.node and engines.npm)
# - .github/workflows/check-node.yml (matrix node-version)
+# - .github/workflows/deploy.yml (node-version)- Add step in
update-node-npm.ymlto also updatenode-versionindeploy.yml:
- name: π Update check-node.yml matrix
if: steps.check-update.outputs.update_needed == 'true' && steps.current-versions.outputs.has_node_yml == 'true'
run: |
...
+
+ - name: π Update deploy.yml node-version
+ if: steps.check-update.outputs.update_needed == 'true'
+ run: |
+ sed -i "s/node-version: [0-9]*\.x/node-version: ${{ steps.node-versions.outputs.lts_latest }}.x/" .github/workflows/deploy.yml
+ echo "Updated deploy.yml node-version"
+ grep "node-version:" .github/workflows/deploy.yml
+
- name: π Create Pull Request
...- Add
deploy.ymlreference to the commit message inupdate-node-npm.yml:
- Update `check-node.yml` file in matrix: ... β ...
+ - Update `deploy.yml` file in node-version: ...
title: ...- Add
deploy.ymlreference to the PR body inupdate-node-npm.yml:
- Update `check-node.yml` file in matrix: `...` β `...`
+ - Update `deploy.yml` file in node-version: `...`
## π§ͺ Tests- Add
DEPLOY_YML_ICONvariable anddeploy.ymlrow to the Summary step inupdate-node-npm.yml:
if [ "${{ steps.current-versions.outputs.has_node_yml }}" == "true" ]; then
NODE_YML_ICON="β
Found"
else
NODE_YML_ICON="β Not found"
fi
+
+ if [ -f .github/workflows/deploy.yml ]; then
+ DEPLOY_YML_ICON="β
Found"
+ else
+ DEPLOY_YML_ICON="β Not found"
+ fi | \`check-node.yml\` | ${NODE_YML_ICON} | CI workflow matrix |
+ | \`deploy.yml\` | ${DEPLOY_YML_ICON} | Deploy workflow node-version |Phase 3: Update deploy.yml node-version
- Update
deploy.ymlfrom20.xto24.xto match the current major version:
- name: π οΈ Setup Node version
uses: actions/setup-node@v6.3.0
with:
- node-version: 20.x
+ node-version: 24.xPhase 4: Address check-node.yml matrix issue
With engine-strict=true and an exact version in engines, only one Node version can pass CI. The original purpose of testing multiple versions is incompatible with strict engine enforcement:
# check-node.yml
matrix:
node-version: [22, 24]check-node.yml
- Option A: Remove the matrix and test only the current major version:
strategy:
matrix:
- node-version: [22, 24]
+ node-version: [24].npmrc
-
Option B: Removeβ Discardedengine-strict=truefrom.npmrcto allow multiple versions
- engine-strict=truePhase 5: Pin exact versions
Workflows were using major version (24) or wildcard (24.x) which resolves to whatever the runner has. With engine-strict=true, this causes CI failures when the runner lags behind the exact engines.node version. All workflows must use exact versions, and update-node-npm.yml must propagate them.
check-node.yml
- Update matrix from
[24]to[24.14.0]:
strategy:
matrix:
- node-version: [24]
+ node-version: [24.14.0]deploy.yml
- Update node-version from
24.xto24.14.0:
- name: π οΈ Setup Node version
uses: actions/setup-node@v6.3.0
with:
- node-version: 24.x
+ node-version: 24.14.0update-node-npm.yml
- Update the matrix output to generate a single exact version, preventing the workflow from reverting the fix:
- name: π Determine matrix versions
id: matrix-versions
run: |
- echo "matrix=[ $LTS_OLDEST, $LTS_LATEST ]" >> $GITHUB_OUTPUT
+ echo "matrix=[$LATEST_VERSION]" >> $GITHUB_OUTPUT- Update
deploy.ymlsed pattern to match and replace exact versions:
- name: π Update deploy.yml node-version
if: steps.check-update.outputs.update_needed == 'true'
run: |
- sed -i "s/node-version: [0-9]*\.x/node-version: ${{ steps.node-versions.outputs.lts_latest }}.x/" .github/workflows/deploy.yml
+ sed -i "s/node-version: [0-9][0-9.]*/node-version: ${{ steps.node-versions.outputs.latest_version }}/" .github/workflows/deploy.yml
echo "Updated deploy.yml node-version"
grep "node-version:" .github/workflows/deploy.yml- Update commit message reference from wildcard to exact version:
- Update `check-node.yml` file in matrix: ... β ...
- - Update `deploy.yml` file in node-version: ${{ steps.node-versions.outputs.lts_latest }}.x
+ - Update `deploy.yml` file in node-version: ${{ steps.node-versions.outputs.latest_version }}
title: ...- Update PR body reference from wildcard to exact version:
- Update `check-node.yml` file in matrix: `...` β `...`
- - Update `deploy.yml` file in node-version: `${{ steps.node-versions.outputs.lts_latest }}.x`
+ - Update `deploy.yml` file in node-version: `${{ steps.node-versions.outputs.latest_version }}`
## π§ͺ TestsPhase 6: Close related PR
- Add a comment on PR release(3.5.0): license, configuration and dependency improvementsΒ #891 explaining this issue and close the PR
π§ͺ Tests
- Verify
update-node-npm.ymlworkflow runs successfully - Verify
deploy.ymlis updated whenupdate-node-npm.ymlruns - Run install locally:
npm install- Run build locally:
npm run build- Run dev locally:
npm run devπ Notes
Version changes
| File | From | To | Type |
|---|---|---|---|
.github/workflows/deploy.yml |
node-version: 20.x |
node-version: 24.14.0 |
π΄ Major |
.github/workflows/check-node.yml |
matrix: [22, 24] |
matrix: [24.14.0] |
π‘ Minor |
- No
.noderc.jsonexists in this repo, soupdate-node-npm.ymlcan already update to the latest LTS without restrictions - Node 24 was tested locally and works correctly (
npm install,npm run buildandnpm run dev)
π References
Files to modify
.github/workflows/update-node-npm.yml.github/workflows/deploy.yml.github/workflows/check-node.yml

