Skip to content

SDK doesn't support import assertions yet #11949

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

Closed
3 tasks done
Zarathustra2 opened this issue May 8, 2024 · 2 comments · Fixed by #15589
Closed
3 tasks done

SDK doesn't support import assertions yet #11949

Zarathustra2 opened this issue May 8, 2024 · 2 comments · Fixed by #15589
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK

Comments

@Zarathustra2
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

"@sentry/nextjs": "^7.113.0",

Framework Version

18.2.0

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

Add following import line with the assert statement

import data from "../../data/foo.json" assert { type: "json" }

See: #8442 (comment)

Expected Result

Sentry should not throw an SyntaxError

Actual Result

SyntaxError: Unexpected token (9:48) in __SENTRY_WRAPPING_TARGET_FILE__.cjs
[@sentry/nextjs] Could not instrument /vercel/path0/pages/<SOME_PAGE>/index.js. An error occurred while auto-wrapping:
@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 May 8, 2024
@github-actions github-actions bot added the Package: browser Issues related to the Sentry Browser SDK label May 8, 2024
@lforst
Copy link
Member

lforst commented May 8, 2024

Thanks! Putting on the backlog.

@getsantry getsantry bot removed the status in GitHub Issues with 👀 3 May 8, 2024
@AbhiPrasad AbhiPrasad added Package: nextjs Issues related to the Sentry Nextjs SDK and removed Package: browser Issues related to the Sentry Browser SDK labels May 27, 2024
@lforst lforst closed this as completed in 502da24 Mar 5, 2025
Copy link
Contributor

github-actions bot commented Mar 6, 2025

A PR closing this issue has just been released 🚀

This issue was referenced by PR #15589, which was included in the 9.5.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants