Skip to content

It looks like the new version of Svelte is incompatible with the @sentry/sveltekit package. Removing the latter allows for successful compilation. #16507

Closed

Description

@sopaco

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

9.27.0

Framework Version

5.33.18

Link to Sentry event

No response

Reproduction Example/SDK Setup

  1. clone the project: https://github.com/sopaco/saga-reader.git.
  2. execute bun run dev.

Logs

build

 [18 lines elided]
│       at emitError (node:events:1:13)
│ ✗ Build failed in 6.72s
│ error during build:
│ [vite-plugin-sveltekit-compile] Failed with code 1
│     at <anonymous> (/Users/jiangmeng/workspace/research/saga-reader/node_modules/@sveltejs/kit/src/utils/fork.js:65:17)
│     at emit (node:events:93:22)
│     at #onClose (node:worker_threads:216:44)
│ error: script "build" exited with code 1
│ beforeBuildCommand `bun run build` failed with exit code 1
│        Error beforeBuildCommand `bun run build` failed with exit code 1

dev

│ [219 lines elided]
│ 5021 |  */
│ 5022 | function originalPositionFor$1(map, needle) {
│ 5023 |     let { line, column, bias } = needle;
│ 5024 |     line--;
│ 5025 |     if (line < 0)
│ 5026 |         throw new Error(LINE_GTR_ZERO);
│                          ^
│ error: `line` must be greater than 0 (lines start at line 1)
│       at originalPositionFor$1 (/Users/Workspace/research/saga-reader/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:5026:19)

System Info

npx envinfo --system --npmPackages svelte,rollup,webpack --binaries --browsers

  System:
    OS: macOS 14.5
    CPU: (12) arm64 Apple M2 Pro
    Memory: 790.73 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node
    npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm
    bun: 1.2.15 - ~/.bun/bin/bun
  Browsers:
    Edge: 134.0.3124.51
    Safari: 17.5

Severity

annoyance

Steps to Reproduce

  1. clone the project: https://github.com/sopaco/saga-reader.git.
  2. execute bun run dev.

Expected Result

build successful

Actual Result

build failure

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jun 9, 2025
  2. snide commented on Jun 9, 2025

    @snide

    Small comment that I ran into this as well this morning when updating my weekly dependencies.

  3. gregg-cbs commented on Jun 9, 2025

    @gregg-cbs

    I am now getting:
    "The requested module '@sentry/core' does not provide an export named 'default'" when building but dev runs fine.

    Build is happening in docker so i think there some version mismatch happening somewhere. It should not be happening.

  4. fuwaneko commented on Jun 9, 2025

    @fuwaneko

    I've got a similar issue with Sentry SDK 9.27, latest macOS.
    SvelteKit 2.21.2 compiles correctly.
    SvelteKit 2.21.3 produces the following error:

    ✗ Build failed in 2.88s
    error during build:
    [commonjs--resolver] node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.node (1:0): Unexpected character '�' (Note that you need plugins to import files that are not JavaScript)
    file: /Users/dmitrii/work/repunzel/app/node_modules/.pnpm/fsevents@2.3.3/node_modules/fsevents/fsevents.node:1:0 (/Users/dmitrii/work/repunzel/app/node_modules/.pnpm/@sentry+sveltekit@9.27.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@1._9444b30d78254d4fbc240375a95ddf1d/node_modules/@sentry/sveltekit/build/cjs/index.server.js)
    
    1: ����@<�
              ��*...
       ^
    4* 
      h���/System/Library/Frameworks/CoreFoundation.framework/Versions...
    3: ���H��1�H���L���L���H�����L�E�L��H��1�����uH�E�H�[A^A_]��}f.�UH��AWAVSPI��H��I��H�H...
    
        at getRollupError (file:///Users/dmitrii/work/repunzel/app/node_modules/.pnpm/rollup@4.41.2/node_modules/rollup/dist/es/shared/parseAst.js:401:41)
        at ParseError.initialise (file:///Users/dmitrii/work/repunzel/app/node_modules/.pnpm/rollup@4.41.2/node_modules/rollup/dist/es/shared/node-entry.js:14293:28)
        at convertNode (file:///Users/dmitrii/work/repunzel/app/node_modules/.pnpm/rollup@4.41.2/node_modules/rollup/dist/es/shared/node-entry.js:16197:10)
        at convertProgram (file:///Users/dmitrii/work/repunzel/app/node_modules/.pnpm/rollup@4.41.2/node_modules/rollup/dist/es/shared/node-entry.js:15440:12)
        at Module.setSource (file:///Users/dmitrii/work/repunzel/app/node_modules/.pnpm/rollup@4.41.2/node_modules/rollup/dist/es/shared/node-entry.js:17185:24)
        at async ModuleLoader.addModuleSource (file:///Users/dmitrii/work/repunzel/app/node_modules/.pnpm/rollup@4.41.2/node_modules/rollup/dist/es/shared/node-entry.js:21187:13)
     ELIFECYCLE  Command failed with exit code 1.
    
  5. sopaco commented on Jun 10, 2025

    @sopaco
    Author

    According to the initial assessment of the Svelte community, this is a bug in the new version of the kit.
    sveltejs/kit#13869

  6. Lms24 commented on Jun 11, 2025

    @Lms24
    Member

    Hey, just leaving an update here as well: It looks like there were some bundling changes made in the latest Kit version which don't play well with our package. I did some investigation in #16528 which doesn't yet fix fixes the problem but I need some input from the Svelte team as well on this. Sorry for the inconvenience!

    Update: We figured out the remaining piece of the puzzle. This should be fixed by EOD.

  7. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jun 11, 2025
  8. Lms24 commented on Jun 11, 2025

    @Lms24
    Member

    closing as completed via #16528. Once this is released, you'll get another notification in this issue

  9. github-actions commented on Jun 11, 2025

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #16528, which was included in the 9.28.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions