Poor stack traces in SSR #7456
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
domain: dx
Related to developer experience of working on Docusaurus sites
Have you read the Contributing Guidelines on issues?
Motivation
Our SSR errors are undebuggable. For example, #7398, #4268.
If a piece of code accesses
window
, all we know is which path is currently being rendered, but if this code is a client module, then it throws on every single path. Beyond that, when you look into the stack, it, at most, shows something likeWhich isn't really telling us anything.
I don't really know what we need to do specifically to fix this: do we use source maps? Do we do SSR in development mode so that React can give us the component stack? Or do we simply wrap some imports in
try
/catch
(I'm thinking specifically about the client modules)?Self-service
The text was updated successfully, but these errors were encountered: