hydrogen
hydrogen copied to clipboard
[BUG] `ssrRewriteStacktrace` throws line error, obfuscates actual error
Describe the bug
Something is wrong when Vite rewrites the stack trace, causing the actual error to not be visible.
To Reproduce
I added prop-types here without specifying it in optimizeDeps config, forcing an error:
https://stackblitz.com/edit/shopify-hydrogen-j8njrq?file=src%2Fcomponents%2Felements%2FButton.jsx&title=Hydrogen
- Create a new Hydrogen app
- Force an error
- Run
yarn dev - See error '[vite] Internal server error:
linemust be greater than 0 (lines start at line 1)'
Expected behaviour The correct error stack trace is shown, instead of the stack trace rewrite line error.
Screenshots
Additional context
- Hydrogen version 1.3.0
- Node version 16