Carson
Carson

Reputation: 103

Installing Notifee with Expo: Error: Notifee native module not found

I'm trying to install Notifee with Expo by using the steps on the installation page: expo install @notifee/react-native and followed by adding "@notifee/react-native" to my plugins in my app.json file then running expo prebuild but I'm still getting errors Error: Notifee native module not found. and Invariant Violation: "main" has not been registered. I manually added the "plugins": [] to my app.json. Am I doing anything wrong here?

Here's what my app.json looks like:

{
  "expo": {
    "name": "GymTracker",
    "slug": "GymTracker",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "supportsTablet": true
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      },
      "package": "GymTracker.app"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "plugins": ["@notifee/react-native"]
  }
}

and my package.json:

"dependencies": {
    "@expo-google-fonts/inter": "^0.2.2",
    "@notifee/react-native": "^5.5.0",
    "@react-native-async-storage/async-storage": "^1.17.7",
    "@react-navigation/native": "^6.0.11",
    "@react-navigation/native-stack": "^6.7.0",
    "expo": "~45.0.0",
    "expo-font": "~10.1.0",
    "expo-splash-screen": "~0.15.1",
    "expo-sqlite": "~10.2.0",
    "expo-status-bar": "~1.3.0",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-native": "0.68.2",
    "react-native-reanimated": "~2.8.0",
    "react-native-safe-area-context": "4.2.4",
    "react-native-screens": "~3.11.1",
    "react-native-web": "0.17.7",
    "react-navigation-stack": "^2.10.4",
    "react-redux": "^8.0.2",
    "redux": "^4.2.0"
  },

Upvotes: 1

Views: 6174

Answers (1)

Fiston Emmanuel
Fiston Emmanuel

Reputation: 4859

Error: Notifee native module not found is clear. You are trying to use native modules in Expo Go client App which not registered and compiled.

Notifee requires Native modules which do not work with The Expo Go client app. You need to compile your custom Expo Go Dev Client with Notifee pre-embedded.

Follow instruction here to compile custom Expo Dev client _ https://www.youtube.com/watch?v=id0Im72UN6w

Upvotes: 4

Related Questions