Skip to content

SDK doesn't support import assertions yet #11949

Closed
@Zarathustra2

Description

@Zarathustra2

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nextjsIssues related to the Sentry Nextjs SDK

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions