next.js
2d19dc62 - [dynamicIO] Use owner stacks for dynamic validation errors (#81277)

Commit
173 days ago
[dynamicIO] Use owner stacks for dynamic validation errors (#81277) With recent improvements in React, and after switching to the React builds for Node.js in #81048, we can now generate better dynamic validation error stacks in dev mode by utilizing owner stacks instead of component stacks. For async I/O, we're using the owner stack exclusively. For sync I/O we're appending the owner stack to the call stack. In a future iteration we might instead log the original error as-is where it occurs, and let `patchErrorInspectNodeJS` handle the owner stack appending as a general solution. Additionally, we're now guiding users in the build-time error messages to using `next dev` for further debugging of dynamic validation errors – or, alternatively, using `next build --debug-prerender`. closes NAR-149
Author
Parents
Loading