Closed benmccann closed 5 months ago
Hi @benmccann thanks for opening this issue,
I took a quick look at the repo from @cesarnml you mentioned and I found these Sentry dependencies registered as devDependencies
. There are a couple of issues:
dependencies
. We've had multiple reports already saying that the SDK causes build errors if it's installed as a dev dependency but it works when it's a dependency. I suppose this has something to do with how Vite handles dev and application dependencies. Also maybe with the fact that we have to retain CJS support in our packages.I played around with Svelte 4 today and for me, a simple SvelteKit+Svelte4 app works well with our SvelteKit SDK. Here's my test repo: https://github.com/Lms24/sentry-sveltekit-svelte4. There could definitely be problems with Svelte 4 but at least my simple example worked.
Let us know if this solves the problems. I'm ooo for the next two weeks, so someone else from our team will pick this up if there's still something to fix. Cheers!
Yeah, I'll trust that project in the issue that was filed was not setup correctly and that it could be improved thus fixing the issue.
It might still be worth leaving this open to track upgrading to the latest @sentry/vite-plugin
in @sentry/sveltekit
though. It seems surprising to me that it would be using an older version
Just chiming in here to confirm that upgrading to the Sentry's SvelteKit SDK worked with both svelte3 and svelte4 in the repo that originally sparked this discussion.
Thank you both for looking into this issue.
@benmccann We might leave this open to track upgrading the vite plugin, however bumping to v2 will likely require a major bump of the SDK so it might take a while.
Please note that the jump from 0.6.0
to 2.2.0
looks way larger than it is. We just skipped version 1
because of technicalities.
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
Framework Version
SvelteKit 1.20.0
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
From https://github.com/sveltejs/svelte/issues/8682:
Expected Result
The latest version should be used here: https://github.com/getsentry/sentry-javascript/blob/9ed5cfdefeb012c6523ca04d0ea697d1829fc004/packages/sveltekit/package.json#L30
It's reported to fix the issue: https://github.com/sveltejs/svelte/issues/8682#issuecomment-1572211488
Actual Result