我已经在互联网上搜索了至少1个小时,但没有任何反应。
我从Atome的Ract native中收到此错误:无法解析模块“ react-native-screen”
我该怎么办:
1- npm install-保存反应导航
2- npm安装
当我运行我的应用程序后,出现错误:
谢谢!
答案 0 :(得分:7)
使用以下步骤,将可以100%工作。
_
npm install react-navigation
expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view
更新导入
npm install react-navigation-stack @react-native-community/masked-view
错误? 如果仍然看到有关程序包的错误和投诉,请执行以下操作:
imports will look like this:
import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
rm -r node_modules
rm package-lock.json
expo upgrade
答案 1 :(得分:1)
我使用了以下步骤:
npm install-保存反应导航
expo安装react-native-gesture-handler react-native-anianidated react-navigation-stack react-native-screens
expo install react-native-safe-area-view
博览会安装@ react-native-community / masked-view
答案 2 :(得分:1)
如果您将expo用于本机项目,那么要进行本机导航,则需要先在依赖项下面安装。
expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view
然后,在安装上述依赖项之后,您可以为各种类型的导航安装依赖项,例如-
npm install @react-navigation/bottom-tabs
npm install @react-navigation/drawer
等
答案 3 :(得分:0)
您需要再安装3个库react-native-gesture-handler
,react-native-reanimated
和react-native-screens
。
npm install --save react-native-gesture-handler react-native-reanimated react-native-screens
答案 4 :(得分:0)
如果您下载了反应导航,那么没有react-native-gesture-handler ,react-native-reanimated, react-native-screens
支持的库,它将无法工作
您可以通过yarn或npm下载它。
npm install react-native-gesture-handler react-native-reanimated react-native-screens
或
yarn add react-native-gesture-handler react-native-reanimated react-native-screens
希望有帮助。毫无疑问
答案 5 :(得分:0)
好的,现在我已经完成了2项操作:
1-npm install-保存react-native-gesture-handler react-native-reanimated react-native-screens
AND
2-npm安装react-native-gesture-handler react-native-animated的react-native-screens
当我运行我的应用程序后,我又遇到了另一个错误和警告:
我应该做什么?
谢谢!
答案 6 :(得分:0)
在您的 .eslintrc.js 中添加以下行:
HttpServletRequest
在您的 .flowconfig 中添加以下内容:
InputStream
答案 7 :(得分:0)
如果要升级到SDK 39。
运行此命令:
expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view
谢谢。