Failed to resolve plugin for module "@sentry/react-native/expo"

76 views Asked by At

I am using and expo app through react native ignite boilerplate. I want to install sentry, I am following these instructions. https://docs.expo.dev/guides/using-sentry/ I run npx expo install @sentry/react-native successfully, the I am trying to add the plugin like this

 "plugins": [
  "expo-localization",
  [
    "expo-build-properties",
    {
      "ios": {
        "newArchEnabled": false
      },
      "android": {
        "newArchEnabled": false
      }
    }
  ],
  [
    "@sentry/react-native/expo",
    {
      "organization": "myslag",
      "project": "myproject"
    }
  ]
],

Then when I am trying to start the project I am getting the following

Failed to resolve plugin for module "@sentry/react-native/expo" relative to "path to my project"
1

There are 1 answers

0
Ugochukwu Ejikeme On

I think it has to do with your Expo Version. You might need to upgrade to SDK 5O to use the "@sentry/react-native/expo" plugin.

SDK 49 and below still uses the sentry expo plugin according to the docs.

{
  "expo": {
    "plugins": ["sentry-expo"]
  }
}