Skip to content
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

Deployment on Netlify using SvelteKit succeeding during build but failing during requests (Cannot find module '@sentry/bundler-plugin-core/sentry-release-injection-file') #9544

Closed
3 tasks done
kyllerss opened this issue Nov 13, 2023 · 6 comments
Labels
Package: sveltekit Issues related to the Sentry SvelteKit SDK Stale Type: Bug

Comments

@kyllerss
Copy link

kyllerss commented Nov 13, 2023

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.80.0

Framework Version

1.25.2

Link to Sentry event

No response

SDK Setup

Sentry.init({
    dsn: <...>,
    tracesSampleRate: 1
});

Steps to Reproduce

Deploy a build in Netlify and access any of the site's URLs. I enabled Sentry integration through Netlify's UI. I also enabled GitHub integration.

I used the SvelteKit wizard CLI tool to enable code changes in the app. Local testing and building work fine.

Expected Result

Should be able to see the homepage without any issues.

Actual Result

The build and deploy process complete successfully, however when I access the site's homepage I get a 500 error. The serverside console shows the following error:

Nov 13, 01:36:38 PM: 164b4a7d ERROR  Error: Cannot find module '@sentry/bundler-plugin-core/sentry-release-injection-file'
Require stack:
- /var/task/app/main/web/.netlify/functions-internal/sveltekit-render.mjs
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
    at Function.resolve (node:internal/modules/cjs/helpers:125:19)
    at node_modules/@sentry/bundler-plugin-core/dist/cjs/index.js (file:///var/task/app/main/web/.netlify/functions-internal/sveltekit-render.mjs:77323:46)
    at __require2 (file:///var/task/app/main/web/.netlify/functions-internal/sveltekit-render.mjs:26:51)
    at node_modules/@sentry/vite-plugin/dist/cjs/index.js (file:///var/task/app/main/web/.netlify/functions-internal/sveltekit-render.mjs:77862:29)
    at __require2 (file:///var/task/app/main/web/.netlify/functions-internal/sveltekit-render.mjs:26:51)
    at node_modules/@sentry/sveltekit/cjs/vite/sourceMaps.js (file:///var/task/app/main/web/.netlify/functions-internal/sveltekit-render.mjs:83465:22)
    at __require2 (file:///var/task/app/main/web/.netlify/functions-internal/sveltekit-render.mjs:26:51)
    at node_modules/@sentry/sveltekit/cjs/vite/sentryVitePlugins.js (file:///var/task/app/main/web/.netlify/functions-internal/sveltekit-render.mjs:83632:22)
    at __require2 (file:///var/task/app/main/web/.netlify/functions-internal/sveltekit-render.mjs:26:51) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/var/task/app/main/web/.netlify/functions-internal/sveltekit-render.mjs'
  ]
}

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Nov 13, 2023
@github-actions github-actions bot added the Package: sveltekit Issues related to the Sentry SvelteKit SDK label Nov 13, 2023
@kyllerss
Copy link
Author

I may have stumbled upon what I assume is the cause: according to Sentry's SDK GitHub documentation, SvelteKit adapter-netlify is not listed as a supported target. This could be an example of an unfortunate coverage gap in feature support: Netlify is touting its Sentry support, while also explicitly supporting many frameworks (SvelteKit being one of them). I don't see anything in their documentation stating their support is partial.

Is this outdated documentation or am I out of luck?

@lforst
Copy link
Member

lforst commented Nov 15, 2023

I don't think adapter-netlify is supported as of now. I also don't think this is a priority for us at the moment so I wouldn't expect this to land too soon. PRs are always welcome!

I'll have @Lms24 confirm all of this though as he is our go-to person for all things SvelteKit.

@Lms24
Copy link
Member

Lms24 commented Nov 15, 2023

Hi @kyllerss, @lforst is correct. Unfortunately, we don't have time to work on SvelteKit adapters at the moment.

@kyllerss
Copy link
Author

Thanks for the clarification (perhaps a documentation update in the meantime?)

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Nov 15, 2023
@Lms24
Copy link
Member

Lms24 commented Nov 15, 2023

Our documentation already states that we don't support the netlify adapter out of the box. As for Netlify's documentation, they might want to update it in the meantime but I'd recommend opening an issue on their end. Thank you!

@getsantry
Copy link

getsantry bot commented Jul 5, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Jul 5, 2024
@getsantry getsantry bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: sveltekit Issues related to the Sentry SvelteKit SDK Stale Type: Bug
Projects
Archived in project
Archived in project
Development

No branches or pull requests

4 participants