skip to Main Content

I’m using @sentry/react-native version 5.18.0 in my React Native project and I’m getting the errors "Use of undeclared identifier ‘kSentryLevelFatal’" and "Use of undeclared identifier ‘kSentryLevelWarning’". My dependencies include axios 1.4.0, moment 2.29.4, react 18.2.0, and react-native 0.72.8. These errors occur when I try to configure Sentry levels. How can I resolve these errors? Is there a new way to set Sentry levels in the latest version?

There is open PR also in the https://github.com/getsentry/sentry-react-native/issues/3863

enter image description here

2

Answers


  1. check your package-lock.json if @sentry/react-native has crown in the version.
    Today sentry team released a new version which has this issues.

    Make sure your package version looks like this "@sentry/react-native": "5.18.0", and not like "@sentry/react-native": "^5.18.0",

    Login or Signup to reply.
  2. You can use @sentry/react-native: ‘5.20.0’. It will resolve your error.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search