ERROR: Unknown named module "react-native-webrtc"

586 views Asked by At

i'm seeing this error in my react-native app on android before launch. I haven't tested on iOS

this is a copy of my metro

 BUNDLE  ./index.js

 WARN  AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. See https://github.com/react-native-async-storage/async-storage
 ERROR  Error: Unknown named module: "react-native-webrtc"
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

My index.js

/**
 * @format
 */

import {AppRegistry} from 'react-native';
import MainProject from './App';
import {name as appName} from './app.json';
import {Provider} from 'react-redux';
import {Provider as PaperProvider} from 'react-native-paper'
import store from './videocall/store'
import 'react-native-gesture-handler'
const AppRedux = () => (
    <Provider {...{store}}>
        <PaperProvider>
            <MainProject />
        </PaperProvider>
    </Provider>
)
AppRegistry.registerComponent(appName, () => AppRedux);

Already tried the answer here , didn't work.

This is package.json

"react": "17.0.1",
"react-native": "0.64.0",
"react-native-peerjs": "^1.0.4",
"react-native-webrtc": "1.89.1
1

There are 1 answers

0
kunlee On BEST ANSWER

Realized it only occurs on 1.89.1

downgrading to 1.84.1 worked for me