fix(docs): unbreak docs deploy on node 24 + resync lockfile [4.x]#139
Merged
Conversation
The `Deploy Docs` workflow has been failing since 2026-05-19 at the
`npm ci` step with:
EUSAGE Missing: commander@13.1.0 from lock file
Root cause: `@bomb.sh/tab` (pulled in transitively via docus -> @nuxt/cli)
declares an *optional* peer dependency `commander@^13.1.0`. npm <= 10.9.x
`npm install` correctly skips the optional peer, but `npm ci` on the same
npm wrongly demands it and rejects the lockfile. npm 11 (bundled with
Node 24) resolves install and ci consistently.
Changes:
- deploy-docs.yml: Node 20 -> 24. Node 20 was already below the stack's
engines requirement (nuxt/nitro need ^22.12 || ^24.11 || >=26) and 24
ships npm 11, which fixes the optional-peer ci bug. One bump, both
problems.
- docs/package.json: pin `docus: latest` -> `^5.12.3`. A floating dist-tag
makes the tree non-deterministic and desyncs the committed lockfile;
Dependabot also can't manage a `latest` tag. Add `engines.node >=22.12`.
- docs/package-lock.json: regenerated with npm 11, in sync with the manifest.
- .github/dependabot.yml: add an `npm` ecosystem rooted at `/docs` so docs
deps get controlled, CI-verified bump PRs instead of drifting silently.
- docs/.nvmrc: 24, so local dev matches CI.
Verified locally on the regenerated lock: `npm ci` (npm 11) exit 0, and
`npm run generate` prerenders all 47 routes and writes .output/public.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the broken documentation deployment by aligning the docs toolchain and CI with a Node/npm combination that can successfully run npm ci, and by making the docs dependency tree deterministic and Dependabot-managed.
Changes:
- Bump the Deploy Docs workflow to Node 24 (npm 11) to avoid the optional-peer/
npm cilockfile enforcement mismatch and satisfy modern packageengines. - Pin
docusto a semver range and add a minimum Node engine for the docs project. - Add Dependabot updates for
/docsand align local docs dev Node version viadocs/.nvmrc.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
docs/package.json |
Pins docus and adds a Node engine floor for deterministic, compatible installs. |
docs/.nvmrc |
Aligns local docs development Node version with CI expectations. |
.github/workflows/deploy-docs.yml |
Updates the docs deploy workflow to run on Node 24 (npm 11). |
.github/dependabot.yml |
Enables Dependabot updates for docs npm dependencies (and schedules GitHub Actions updates). |
docs/package-lock.json |
Resynced lockfile to match the updated docs manifest and npm 11 resolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
The Deploy Docs workflow has been failing since 2026-05-19 (last green deploy: 2026-05-12). It dies at the
npm cistep indocs/:Failing run: https://github.com/relaticle/flowforge/actions/runs/28388314274/job/84108617614
Root cause (reproduced locally)
@bomb.sh/tab— pulled in transitively viadocus → @nuxt/cli— declares an optional peer dependencycommander@^13.1.0(peerDependenciesMeta.commander.optional = true; it works with cac/citty/commander, and@nuxt/cliuses citty).npm ≤ 10.9.x (the version bundled with the workflow's Node 20)
npm installcorrectly skips the optional peer, butnpm cion the same npm wrongly demands it and rejects the lockfile. Regenerating the lock with npm 10 does not fix it —npm cithen fails withInvalid: lock file's commander@7.2.0 does not satisfy commander@13.1.0. npm 11 (bundled with Node 24) resolvesinstallandciconsistently.Two secondary issues compounded it:
"docus": "latest"— a floating dist-tag makes the docs dependency tree non-deterministic and lets the committed lockfile drift out of sync. Dependabot also can't govern alatesttag.engines—@nuxt/nitro-server@4.4.8etc. requirenode ^22.12.0 || ^24.11.0 || >=26.0.0(theEBADENGINEwarnings in the log). Even with the lock fixed, Node 20 was on borrowed time.Fix
deploy-docs.yml: Node 20 → 24npm cibug) and satisfies the packages'engines. One bump, both problems.docs/package.json:docus: latest → ^5.12.3+ addengines.node >= 22.12.0docs/package-lock.json: regenerated with npm 11.github/dependabot.yml: addnpmecosystem at/docsdocs/.nvmrc:24Verification
Reproduced the original failure on the checked-out commit, then verified the fix on the regenerated lockfile:
npm ci(npm 11) → exit 0,added 1291 packagesnpm run generate(the workflow's build step, with the CI env vars) → Build complete!, 47 routes prerendered,.output/public/index.htmlwritten (172 files)