Skip to content

Metro unstable_enablePackageExports cause app crash #3152

@aliza-khu

Description

@aliza-khu

OS:

  • MacOS

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 5.6.0)

react-native version: 0.72.0

Are you using Expo?

  • No

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'https://...@sentry.io/...'
  tracesSampleRate: [value],
  environment: [value],
  debug: [value],
  initialScope: [value],
  enableNdkScopeSync: [value],
});

I have following issue:

  • TypeError: TypeError: Cannot read property '__extends' of undefined, js engine: hermes
  • TypeError: Cannot read property '__awaiter' of undefined

In One of the error files I found in the sentry's node module is ".../node_modules/@sentry/react-native/dist/js/client.js"

Steps to reproduce:

  • Switch to react native 0.72.0
  • Under metro.config.js file
const config = {
  resolver: {
    unstable_enableSymlinks: true,
    unstable_enablePackageExports: true,
  }
};

Actual result:

Facing above mentioned errors.

Expected result:

No Errors should be thrown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions