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

Build Error @sentry/svelte #5773

Closed
3 tasks done
tarasowski opened this issue Sep 19, 2022 · 6 comments · Fixed by #5969
Closed
3 tasks done

Build Error @sentry/svelte #5773

tarasowski opened this issue Sep 19, 2022 · 6 comments · Fixed by #5969
Assignees
Labels
Package: svelte Issues related to the Sentry Svelte SDK Type: Bug

Comments

@tarasowski
Copy link

tarasowski commented Sep 19, 2022

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

@AbhiPrasad
Copy link
Member

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?

@AbhiPrasad AbhiPrasad added Status: Needs Information Package: svelte Issues related to the Sentry Svelte SDK labels Sep 19, 2022
@tarasowski
Copy link
Author

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

@Lms24
Copy link
Member

Lms24 commented Sep 29, 2022

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?

@tarasowski
Copy link
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/

@Lms24
Copy link
Member

Lms24 commented Sep 29, 2022

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?

@AbhiPrasad
Copy link
Member

Maybe this applies here? #4473 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: svelte Issues related to the Sentry Svelte SDK Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants