react-native - 在解析模块时 react native 编译错误

标签 react-native

由于这个错误,我无法编译我的项目。

Unable to resolve module @react-navigation/core from node_modules\@react-navigation\native\src\createAppContainer.js:



当我运行时,我遇到了这个问题。有谁能够帮助我?

最佳答案

有时会发生这样的错误作为锁定版本的 package-json.lock 文件。

所以做一件事从你的 package.json 中删除 @react-navigation 的版本和所有相关的依赖项,然后再次执行以下操作

npm install @react-navigation/native --save

npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view --save

必须帮忙!

关于react-native - 在解析模块时 react native 编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60167106/

相关文章:

react-native - 如何发送 session 信息并在 expo react native 段和幅度集成中进行自动页面跟踪

javascript - React Native navigation.navigate 参数未更新

javascript - 如何减少 expo 项目中的 apk 大小?

android - react native (Android): Run inside fragment?

android - react native LruCache : Does it cache images from image urls

react-native - react 导航 state.params 不起作用

javascript - clearInterval() 在 React Native 功能组件中不起作用

android - NSString 类型的 JSON 值无法转换为 ABI38_0_0YGValue

ios - xcode 6 "is not registered as a URL scheme. Please add it in your Info.plist"错误

react-native - React Native - 提供全局主题的最佳方式是什么?