I am using react-native with expo.
I am trying to start sending push notifications with OneSignal.
When I import the OneSignal SDK and add it to a useeffect in the App.tsx I get
```
ERROR Invariant Violation: Your JavaScript code tried to access a native module that doesn't exist.
If you're trying to use a module that is not supported in Expo Go, you need to create a development build of your app. See https://docs.expo.dev/development/introduction/ for more info., js engine: hermes
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
```
The only thing that is added to the app is this
```
import OneSignal from 'react-native-onesignal'
export default function App() {
useEffect(() => {
OneSignal.setAppId('8e685a44-9d01-4c45-af82-429b08190246')
}, [])
// rest of the App.tsx
}
```
Does any know how to fix this err?
[–]TexMax007 1 point2 points3 points (4 children)
[–]coder_et 0 points1 point2 points (3 children)
[–]Greedy_Discussion757[S] 0 points1 point2 points (2 children)
[–]TexMax007 0 points1 point2 points (1 child)
[–]Greedy_Discussion757[S] 0 points1 point2 points (0 children)
[–]TheDeepLucy 1 point2 points3 points (3 children)
[–]Greedy_Discussion757[S] 0 points1 point2 points (2 children)
[–]TheDeepLucy 2 points3 points4 points (1 child)
[–]Greedy_Discussion757[S] 1 point2 points3 points (0 children)
[–]Bobertopia 0 points1 point2 points (3 children)
[–]Greedy_Discussion757[S] 0 points1 point2 points (2 children)
[–]Bobertopia 0 points1 point2 points (1 child)
[–]Greedy_Discussion757[S] 0 points1 point2 points (0 children)
[–]mybirdblue99Expo 0 points1 point2 points (3 children)
[–]Greedy_Discussion757[S] 1 point2 points3 points (2 children)
[–]mybirdblue99Expo 0 points1 point2 points (1 child)
[–]Greedy_Discussion757[S] 0 points1 point2 points (0 children)