Skip to content

Build Error @sentry/svelte #5773

Closed

Description

@tarasowski

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/node

SDK Version

7.13.0

Framework Version

Svelte 3.46.4

Link to Sentry event

No response

Steps to Reproduce

  1. Trying to run npm run build and getting this error:
Could not resolve './{}.js' from node_modules/@sentry/utils/esm/index.js
error during build:
Error: Could not resolve './{}.js' from node_modules/@sentry/utils/esm/index.js
  • I'm using vite 2.8.6
  • Svelte (not Sveltekit)
  • No code transpiling

Expected Result

Successful build

Actual Result

Build fails

Activity

  1. AbhiPrasad commented on Sep 19, 2022

    @AbhiPrasad
    Contributor

    Hey, thanks for writing in! Could you supply a minimal reproduction of what you were trying to run npm run build on? This would help us debug why this error is occuring.

    Are you using webpack/rollup or another bundler? Do you do any transpiling of code? Are you using SvelteKit alongside Svelte?

  2. tarasowski commented on Sep 19, 2022

    @tarasowski
    Author

    @AbhiPrasad sure, just added answers to your question:
    I'm using vite 2.8.6
    Svelte (not Sveltekit)
    No code transpiling

  3. Lms24 commented on Sep 29, 2022

    @Lms24
    Member

    Hi @tarasowski

    do you still encounter this problem? If yes, can you show us how you're initializing the SDK? What are you importing from the SDK? Are you using component tracking?

    I'm guessing you've selected @sentry/node as the package you're using because at the time of writing this issue, the Svelte SDK was not in the issue template list, right? Or in other words, are you using other/additional Sentry SDKs in your projects? Are you using @sentry/tracing?

  4. tarasowski commented on Sep 29, 2022

    @tarasowski
    Author

    I still have this error. I have removed it from my app right now.
    I was following this instruction here: https://docs.sentry.io/platforms/javascript/guides/svelte/

  5. Lms24 commented on Sep 29, 2022

    @Lms24
    Member

    That's unfortunate as I'd love to get to the bottom of this (our Svelte SDK is still quite new so there might be some cases we haven't discovered yet that may cause this). Let me know in case you install the SDK again or if you have time to provide a minimal reproduction.
    Just to confirm: Were you using component tracking? More specifically, did you use our Sentry.componentTrackingPreprocessor?

  6. AbhiPrasad commented on Oct 6, 2022

    @AbhiPrasad
    Contributor

    Maybe this applies here? #4473 (comment)

  7. self-assigned this
    on Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions