Skip to content

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

@kyllerss

Description

@kyllerss

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'
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions