-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Problem with Server Sourcemaps in SvelteKit #8218
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
Comments
Hi @danieldiekmeier thanks for writing in!
As long as you didn't deactivate
Yes, we're aware of this. We already raised this with the SvelteKit maintainers but never got a response. Thanks for creating this issue - maybe this helps move things forward. However, I'm not sure yet if the path here is indeed the problem because we had the same issue for example in universal or server To confirm, the error you're showing here comes from being thrown directly in the Meanwhile, can you check if server errors thrown in |
@danieldiekmeier, I tried to reproduce this in this minimal reproduction app and for me source maps seem to work. Would you mind taking a look at it and tell me what we need to do to reproduce this error? Feel free to fork the repo. |
Okay, I looked into it a little more, and I tried just submitting and error manually with But then I changed the removed the SvelteKit-specific stuff and tried (The relative paths are still wrong, but … it's something.) As the author, you know more about the internals of |
@danieldiekmeier we modify the file paths of the stack frames in the SvelteKit SDK, similarly to what the Right now, we basically strip it to just the file name (i.e. However, I'm working on a change here to add support for SvelteKit apps on Vercel. With this change, we'll strip the absolute path until we reach the server subdir of the SvelteKit output directory ( |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/sveltekit
SDK Version
7.53.1
Framework Version
1.18.0
Link to Sentry event
https://eintrittskartenio.sentry.io/issues/4208536907/?environment=development&project=1422627&query=is%3Aunresolved&referrer=issue-stream&stream_index=0
SDK Setup
Steps to Reproduce
npx @sentry/wizard@latest -i sveltekit
to automatically add Sentry to my SvelteKit Applicationbuild: { sourcemaps: true }
in my vite.config.js, because I want sourcemaps for the servervite build
), started it (node ./build
) and triggered an error locally../../../../src/routes/+page.svelte
, but relative tobuild/server/chunks
, this is outside of my project folder. So I checked where these paths get set, and ended up creating this bug report in the SvelteKit repo:adapter-node
breaks paths to sourcemap sources by copying files during build sveltejs/kit#10040app://
), showing only the filename. In a typical SvelteKit app, many many files are called+page
or+layout
, so this is less than ideal. :DExpected Result
The full path to the file should be shown.
Actual Result
Previously, when I didn't use sourcemaps, it showed the whole filepath:
The text was updated successfully, but these errors were encountered: