sentrySvelteKit and SST with TypeScript. There was a problem bundling the SSR function for the "ServerFunction" Site
Is there an existing issue for this?
- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [X] I have reviewed the documentation https://docs.sentry.io/
- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/sveltekit
SDK Version
8.18.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup/Reproduction Example
No response
Steps to Reproduce
SST SvelteKitSite building with Vite and sentrySvelteKit(). Runs fine locally but when I run sst build I'm getting the following error: Error: There was a problem bundling the SSR function for the "ServerFunction" Site. No loader is configured for ".node" files: node_modules/.pnpm/[email protected]/node_modules/fsevents/fsevents.node
Expected Result
Should build
Actual Result
Failed build
Hi @james-g-stream thanks for writing in! First of all: TIL about SST 😅
Given that I don't have more context around this, please provide a minimal reproduction that we can use to further investigate this. On top of my head, the error message doesn't ring a bell to me and at the moment there are too many unknowns for us to debug this.
Have you tried disabling auto instrumentation and/or sourcemaps upload in the sentrySvelteKit plugin? This would help guiding us into the right direction but we still need a minimal reproducer please. Thanks!
@Lms24 thanks for responding, it seems the @sentry/sveltekit doesn't support the svelte-kit-sst SvelteKit Adapter. I was able to use sentryVitePlugin and only use @sentry/sveltekit in hooks.client.ts but it doesn't work server side in hooks.server.ts if anyone runs into this in the future. I'll close the ticket.
Hmm it's interesting that the server-side SDK causes problems here. Usually I'd only expect this if the app would be deployed to some none-Node runtime like Vercel edge. But the way I understand SST, it uses AWS Lambda for the server.
You're technically correct - we don't support the SST adapter and it's unlikely that we'll do in the near future.
If you or someone else coming across this issue find out more about what's going wrong and what needs to be fixed, please feel free to tag me. Maybe we can work towards SST support together!
Also experiencing this. Just trying to deploy a basics SK site to AWS via SST. If it makes sense to, I'd love to help debug what's going on here.
anyone find a solution