Pin playcanvas to ~2.19.7 to fix broken build#1074
Merged
Conversation
Engine 2.20.0 (playcanvas/engine#8950) moved updateClientRect() into the base GraphicsDevice constructor, which calls canvas.getBoundingClientRect(). @playcanvas/react constructs a NullGraphicsDevice with a bare mock canvas object at module scope for SSR, so importing it during Docusaurus static site generation now throws, failing all 639 doc pages. Pin the engine to 2.19.x (tilde range, since a caret would re-resolve to 2.20.x) until the upstream fixes land. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 1, 2026
willeastcott
added a commit
that referenced
this pull request
Jul 2, 2026
Engine 2.20.5 fixes the NullGraphicsDevice constructor crash on mock canvases (playcanvas/engine#8999) that broke static site generation, so the ~2.19.7 pin from #1074 is no longer needed. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
What changed
Pins
playcanvasto~2.19.7inpackage.json(with the matchingpackage-lock.jsonupdate), reverting the bump to 2.20.4 from f6039fa.Why
npm run buildhas been failing onmainsince the dependency update (CI and the GitHub Pages deploy are both red). Static site generation crashes on all 639 doc pages.Root cause: engine 2.20.0 includes playcanvas/engine#8950, which moved
updateClientRect()into the baseGraphicsDeviceconstructor. That callsthis.canvas.getBoundingClientRect().@playcanvas/reactcreates aNullGraphicsDevicefor SSR using a bare mock object ({ id: 'pc-react-mock-canvas' }) as the canvas — and does so at module scope — so merely importing@playcanvas/reactduring SSG throwsgetBoundingClientRect is not a function. The crash corrupts the shared doc-page chunk, which is why every page then fails with the misleadingCannot read properties of undefined (reading 'A')error.Notes for reviewers
^2.19.7would immediately re-resolve to 2.20.4 and break again.getBoundingClientRect()call in the engine, and/or give@playcanvas/react's SSR mock canvas agetBoundingClientRectstub (and make its module-scope null application lazy). Once either ships, this pin can be relaxed back to^2.20.x.npm run build(en + ja) passes with 2.19.7 and fails with 2.20.0 through 2.20.4.🤖 Generated with Claude Code