-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors in the first two lines of server-side endpoints are not reported #3243
Comments
Reproduction here: https://github.com/lovasoa/sveltekit-bug-3118 |
@lovasoa can you check if this is reproducible with Vite without SvelteKit? I imagine that it would be and should be filed there. See https://github.com/sveltejs/kit#bug-reporting for more details |
This is difficult (not impossible, but difficult) to fix because it's hard to know if a stack trace has already been fixed by Vite. I've opened vitejs/vite#7046 |
Should be an easy fix when we next update Vite: vitejs/vite#7048 |
🎉Thanks @Rich-Harris ! |
Describe the bug
When the first line of a server-side endpoint contains an error, the dev server displays
TypeError: Line must be greater than or equal to 1, got -1
instead of showing the actual error.Reproduction
Create a svelte-kit project and paste this in src/routes/server-side.js
then start the dev server, load
http://localhost:3000/server-route
in your browserThen add a line at the top of the file, containing
thisvariableisnotdefined
, so as to getLogs
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: