错误:未知的命名模块“react-native-webrtc”
Posted
技术标签:
【中文标题】错误:未知的命名模块“react-native-webrtc”【英文标题】:ERROR: Unknown named module "react-native-webrtc" 【发布时间】:2021-05-08 23:47:32 【问题描述】:在启动之前,我在 android 上的 react-native 应用程序中看到了这个错误。我还没有在 ios 上测试过
这是我的地铁的副本
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.
我的 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);
已经试过here的答案,不行。
这是 package.json
"react": "17.0.1",
"react-native": "0.64.0",
"react-native-peerjs": "^1.0.4",
"react-native-webrtc": "1.89.1
【问题讨论】:
【参考方案1】:意识到它只发生在 1.89.1
降级到 1.84.1 对我有用
【讨论】:
以上是关于错误:未知的命名模块“react-native-webrtc”的主要内容,如果未能解决你的问题,请参考以下文章
获得 95% 发出未命名的兼容插件错误:未知:未知错误,打开
另一个未知实体命名空间别名错误(Symfony2,手动创建的实体)
如何防止命名空间 HTML 元素的 Vue 错误“未知自定义元素”
使用 Jest 测试 NUXT.js 和 Vue.js 应用程序。获取“在 mapState() 中找不到 [vuex] 模块命名空间”和“[vuex] 未知操作类型”