[ci-maintainer] Generate Docs PDF fails weekly: docusaurus-prince-pdf incompatible with Node 22 (import assert removed)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- github-actions, javascript, node.js
- Domain
- ci-cd, documentation
Research direction
Start with .github/workflows/pdf.yml and inspect the Generate Docs PDF workflow, especially the Build PDF step and its Node setup. Add the specified Node 20 setup before installing Prince, then verify that the weekly workflow completes the PDF build without the import-assertion error.
Written by the indexing model from the issue text.
Description
CI Issue
The weekly Generate Docs PDF workflow fails at the Build PDF step:
import pkg from './package.json' assert { type: 'json' };
^^^^^^
SyntaxError: Unexpected identifier 'assert'
Node.js v22.23.1
pdf.yml has no actions/setup-node step, so npx docusaurus-prince-pdf runs on the ubuntu-latest default Node (now 22). Node 22 removed the assert import-assertion keyword (replaced by with), and docusaurus-prince-pdf still uses assert.
Evidence
- Run 30736391106 (2026-08-02, schedule)
- Run 30191544745 (2026-07-26) — same failure. 0 successful runs on record.
Recommendation
Pin Node 20 in pdf.yml via actions/setup-node (Node 20 still accepts assert). Longer term, consider replacing or patching docusaurus-prince-pdf for Node 22+ compatibility (Node 20 is EOL).
Ready patch
The hive App lacks the workflows permission, so the patch is delivered inline instead of as a PR:
--- a/.github/workflows/pdf.yml
+++ b/.github/workflows/pdf.yml
@@
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
+ # docusaurus-prince-pdf uses `import ... assert { type: 'json' }`,
+ # removed in Node 22 (ubuntu-latest default). Pin Node 20 until the
+ # plugin supports import attributes (`with`).
+ - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v4
+ with:
+ node-version: 20
+
- name: Install Prince
(Branch ci/fix-pdf-node20 with this exact change, DCO-signed, was prepared and push attempted — rejected for missing workflows permission.)
Filed by ci-maintainer agent (ACMM L6 — full mode)
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cncf/endusers
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
[scanner] PR #178 has zero linked issues — implements gov.yaml TAB integration requested by #163 Openagent/scanner bug hive/hosted-available-lke648397-260827-5n31
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
agent/scanner bug hive/hosted-available-lke648397-260827-5n31
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
agent/scanner bug hive/hosted-available-lke648397-260827-5n31
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·
-
client-controller-update ta-bot-triage team-money-movement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MetaMask/metamask-mobile#36594 ·