Files
nyaterm/docs-site/package.json
KangandClaude Opus 5 dc26370b92 ci(docs): run the documentation job on Node 22 with a pinned pnpm
The Documentation site job failed on its first run. `pnpm/action-setup` with
`version: 11` resolved to pnpm 11.22.0, which imports `node:sqlite` and so
needs Node.js >= 22.13, but the job pinned Node 20 and crashed with
ERR_UNKNOWN_BUILTIN_MODULE before installing anything. It passed locally only
because this machine runs Node 26.

- Move the job to Node 22. Node 20 reached end of life in April 2026, so
  raising the floor was due regardless of pnpm.
- Pin pnpm to 11.15.1, the version that produced the lockfile, instead of the
  floating 11 range. A range means the next 11.x release can move the Node
  floor again without any change in this repository, which is exactly what
  happened here.
- Add `packageManager` to docs-site/package.json so a local pnpm cannot
  silently diverge from CI, and correct the setup guide, which told
  contributors Node 18+ was enough and would have walked them into the same
  crash.

Verified by reproducing the CI environment locally: a clean
`pnpm --dir docs-site install --frozen-lockfile` plus
`pnpm --dir docs-site build` and the parity script, all under Node 22.23.2 with
pnpm 11.15.1, and re-checked on the Node 26 toolchain used for local work.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 11:58:05 +08:00

53 lines
1.4 KiB
JSON

{
"name": "nyaterm-docs",
"version": "0.3.5",
"private": true,
"packageManager": "pnpm@11.15.1",
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus serve --build",
"start:zh": "docusaurus start --locale zh-CN",
"start:en": "docusaurus start --locale en",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "pnpm run build && wrangler deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"preview": "pnpm run build && wrangler dev"
},
"dependencies": {
"@docusaurus/core": "^3.10.0",
"@docusaurus/preset-classic": "^3.10.0",
"@docusaurus/utils-validation": "^3.10.1",
"@easyops-cn/docusaurus-search-local": "^0.55.2",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.1.1",
"prism-react-renderer": "^2.4.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.10.0",
"@docusaurus/types": "^3.10.0",
"typescript": "~5.6.0",
"wrangler": "^4.100.0"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=18.0"
}
}