English 中文(简体)
无法找到模块反应-安全-地区-文字
原标题:Cannot find module react-native-safe-area-context

i m learning React Native. I m trying to use SafeAreaProvider and SafeAreaView but when i do this :

import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";

i 传递信息 Cannot发现模块反应-安全-地区-内容

我的版本如下:

"dependencies": {
    "@react-native-community/masked-view": "^0.1.11",
    "expo": "~48.0.18",
    "expo-status-bar": "~1.4.4",
    "react": "18.2.0",
    "react-native": "0.71.8",
    "react-native-safe-area-context": "4.5.0",
    "react-navigation": "^4.4.4"

你们能否帮助我? 谢谢你!

我试图从4.7.1降至4.5级反应安全区。

问题回答

你重读错误信息“没有找到模块反应-安全-地区-内容”,因为安全AreaContext图书馆没有在你的环境中安装。

图书馆包括博览会,但如果您重新使用国家预防机制,请遵循以下指示:

• 在你的环境终端站进行这一指挥,在当地安装图书馆:

- npx expo install react-native-safe-area-context

如果这一指挥没有工作,则试图这样做:

npx expo install react-native-screens react-native-safe-area-context

重新开车,关闭该案的所有终点站





相关问题
How to use one react app into another react app?

I have two react apps, parent app and child app. and child app have an hash router. I have build the child app using npm run build, It creates build folder. That build folder moved into inside the ...

how to get selected value in Ant Design

I want to print the selected value, and below is my option list: const vesselName = [ { value: 0 , label: ALBIDDA , }, { value: 1 , label: ALRUMEILA , }, { value: 2 ,...

How to add a <br> tag in reactjs between two strings?

I am using react. I want to add a line break <br> between strings No results and Please try another search term. . I have tried No results.<br>Please try another search term. but ...

热门标签