v5 upgrade guide: npm plugin specifier migration is not optional when legacy-peer-deps is set
Describe the bug
docs/getting-started/upgrading.md describes the npm plugin-specifier migration as optional and states that github: specifiers continue to work. On an existing v5 site this is not true, because the same upgrade also introduces legacy-peer-deps=true into .npmrc.
github: sources are cloned and built from source. @quartz-community/syntax-highlighting declares shiki as a peerDependency, and with legacy-peer-deps=true npm does not install it, so the plugin's TypeScript build fails. The plugin is then skipped — but install-plugins and quartz build both exit 0, so the site ships silently without syntax highlighting.
To Reproduce
- Start from an existing v5 site whose
quartz.config.yamlusesgithub:quartz-community/*plugin specifiers, includinggithub:quartz-community/syntax-highlighting - Merge current
v5(this bringslegacy-peer-deps=trueinto.npmrc) - Run
npm ci - Run
npm run install-plugins - See the build error and the skip warning below; note the exit code is 0
- Run
npx quartz build— it also exits 0, with a lower page count than before
Expected behavior
Either github: specifiers keep working as the upgrade guide states, or the failure is loud — a non-zero exit, so a broken build cannot be deployed unnoticed.
Screenshots and Source
No public reproduction repo, but the failure output is deterministic:
> npx tsx ./quartz/plugins/loader/install-plugins.ts
src/token-classifier.ts(1,71): error TS2307: Cannot find module 'shiki'
⚠ Skipping syntax-highlighting: no dist/index.d.ts found
✓ Regenerated plugin index with 35 pluginsThe resulting build emitted 801 files instead of 803, with no error and exit code 0.
Migrating the specifiers to npm form resolves it — npm-published plugins ship pre-built and need no peer resolution:
- source: github:quartz-community/syntax-highlighting
+ source: "@quartz-community/syntax-highlighting"(Note that one package name differs from its repo name: github:quartz-community/fonts becomes @quartz-community/quartz-fonts.)
Desktop (please complete the following information):
- Quartz Version: v5 branch, upstream tip
74b3fc9(2026-07-30) nodeVersion: v22.23.1npmversion: 10.9.8- OS: Linux (Debian-based)
- Browser: n/a — build-time issue
Additional context
Two suggestions, in order of confidence:
The upgrade guide should state that the specifier migration is required, not optional, for anyone using
github:specifiers with plugins that have peer dependencies — or thatlegacy-peer-deps=truebreaks build-from-source plugin installs.Separately, a plugin failing to build and being skipped probably shouldn't leave a zero exit code. The skip is reported as a warning and the build succeeds, so the only symptom is a page count that quietly changes. In my case the site would have deployed without syntax highlighting and nothing would have flagged it.
Source: jackyzha0/quartz