Skip to content

Declare @docusaurus/plugin-content-docs and @docusaurus/theme-common - #444

Merged
nohwnd merged 1 commit into
mainfrom
nohwnd-declare-docusaurus-deps
Aug 11, 2026
Merged

Declare @docusaurus/plugin-content-docs and @docusaurus/theme-common#444
nohwnd merged 1 commit into
mainfrom
nohwnd-declare-docusaurus-deps

Conversation

@nohwnd

@nohwnd nohwnd commented Aug 11, 2026

Copy link
Copy Markdown
Member

Main does not build since #435.

The tutorial components and the swizzled theme files from #421 import @docusaurus/plugin-content-docs/client and @docusaurus/theme-common, but neither package is in package.json. They only ever came in transitively through @docusaurus/preset-classic, and yarn hoisted them into a flat node_modules so the imports resolved anyway. pnpm uses a strict layout where a package that is not declared is not resolvable, so the client bundle now fails.

Both PRs are green on their own, it is the combination that breaks, so neither deploy preview caught it.

pnpm build on 1c880e9:

[ERROR] Client bundle compiled with errors therefore further build is impossible.
× Module not found: Can't resolve '@docusaurus/plugin-content-docs/client' in 'src/components/TutorialChecklist'
× Module not found: Can't resolve '@docusaurus/theme-common' in 'src/components/TutorialTracker'
× Module not found: Can't resolve '@docusaurus/plugin-content-docs/client' in 'src/pages'
× Module not found: Can't resolve '@docusaurus/plugin-content-docs/client' in 'src/theme/DocItem/Layout'
... 4 more

With this change pnpm build passes. The other @docusaurus/* imports in src are core aliases, not packages, so they need no entry.

🤖

Main does not build since #435. The tutorial components and the swizzled
theme files from #421 import @docusaurus/plugin-content-docs/client and
@docusaurus/theme-common, but neither package is in package.json. They only
ever came in transitively through @docusaurus/preset-classic, and yarn
hoisted them into a flat node_modules so the imports resolved. pnpm uses a
strict layout where a package that is not declared is not resolvable, so the
client bundle now fails with 8 "Module not found" errors.

Both PRs are green on their own, the combination is what breaks, so neither
deploy preview caught it.

Verified: pnpm build fails on 1c880e9 and passes with this change.

🤖
@nohwnd
nohwnd merged commit 2ebc0ac into main Aug 11, 2026
4 checks passed
@nohwnd
nohwnd deleted the nohwnd-declare-docusaurus-deps branch August 11, 2026 20:35
nohwnd added a commit to fflaten/docs that referenced this pull request Aug 11, 2026
pnpm-lock.yaml conflicted as add/add, this branch and main both created it
when migrating off yarn. Regenerated it from the merged package.json instead
of resolving by hand, so it now carries main @docusaurus/plugin-content-docs
and @docusaurus/theme-common from pester#444 together with @tanstack/react-table
9.1.2 from here.

Verified: pnpm build passes, and the five additional-resources pages that use
PesterDataTable render their tables.

🤖
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant