React Native无法解析模块

亨里克
error: Error: Unable to resolve module react-native-safe-area-context from C:\USER\App\NavigationApp\NavigationApp\node_modules\@react-navigation\stack\src\views\Stack\StackView.tsx: react-native-safe-area-context could not be found within the project.

我什么都没写,只是想学习React Navigation。我安装了@ react-navigation / native,以为现在可以开始了。但是,而不是JSX,我收到此错误:怎么办?

我的代码:

import React from 'react';
import { View, Text } from 'react-native';


import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';


const App = () => {
  return (
    <View>
      <Text>Hello</Text>
    </View>
  );
};

const styles = StyleSheet.create({

});

export default App;

PacyL.js

react-native-navigation软件包需要几个其他软件包才能工作,并且react-native-safe-area-context是其中一部分,您只需要安装它$ npm i --save react-native-safe-area-context

在此处了解更多信息(https://reactnavigation.org/docs/getting-started/)快乐编码

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Twilio React Native-无法解析模块密码

来自分类Dev

错误:找不到模块“ react-native-web” /未找到模块:错误:无法解析模块“ react-native-web”

来自分类Dev

React Native:无法解析模块fs

来自分类Dev

无法要求以本机解析。'需要未知的模块“ react-native”

来自分类Dev

无法解析模块“ react-native-reanimated”

来自分类Dev

React Redux无法解析自己的模块

来自分类Dev

react-native无法解析模块'warnOnce'

来自分类Dev

无法从App.js解析(模块)-React Native

来自分类Dev

错误:未定义无法在React Native中从'AppNavigator.js'解析模块'./Home'

来自分类Dev

收到此错误:错误:捆绑失败:错误:无法解析模块“ react-native-safe-area-context”

来自分类Dev

React-Native-无法从node_modules / eslint / lib / cli-engine / cli-engine.js解析模块fs

来自分类Dev

找不到模块:错误:无法解析“ ../aws-exports”(React-Native Expo Web)

来自分类Dev

反应本机无法解析模块'module://react-native-screens.js

来自分类Dev

React Native导入错误:无法使用.bin解析模块(如何导入某种类型的文件?)

来自分类Dev

React Native-使用我制作的自定义组件时出现错误(错误:undefined无法解析模块<MyModule>)

来自分类Dev

找不到模块:安装React Native Gesture Handler时无法解析'@ egjs / hammerjs'

来自分类Dev

无法使用React解析打字稿模块

来自分类Dev

React-Native错误:无法从“ index.js”解析模块“ / screen / Welcome”:

来自分类Dev

无法从App.js解析模块-React Native

来自分类Dev

react-native-community / CheckBox无法解析模块

来自分类Dev

尝试在React Native中组织模块时无法解析模块

来自分类Dev

React Native错误-无法解析模块`。/ tab-bar-item-ios`

来自分类Dev

UnableToResolveError:无法解析模块`./node_modules/react-native/packager/src/components` React Native

来自分类Dev

React-native 无法在导入 js 文件时解析模块

来自分类Dev

图像路径 react-native:无法解析模块

来自分类Dev

React Native 错误“无法解析模块‘react-native’”

来自分类Dev

React Native Image 无法解析模块

来自分类Dev

React Native 错误:无法解析模块`./index`

来自分类Dev

React Native TypeScript:无法解析模块(但它存在)

Related 相关文章

  1. 1

    Twilio React Native-无法解析模块密码

  2. 2

    错误:找不到模块“ react-native-web” /未找到模块:错误:无法解析模块“ react-native-web”

  3. 3

    React Native:无法解析模块fs

  4. 4

    无法要求以本机解析。'需要未知的模块“ react-native”

  5. 5

    无法解析模块“ react-native-reanimated”

  6. 6

    React Redux无法解析自己的模块

  7. 7

    react-native无法解析模块'warnOnce'

  8. 8

    无法从App.js解析(模块)-React Native

  9. 9

    错误:未定义无法在React Native中从'AppNavigator.js'解析模块'./Home'

  10. 10

    收到此错误:错误:捆绑失败:错误:无法解析模块“ react-native-safe-area-context”

  11. 11

    React-Native-无法从node_modules / eslint / lib / cli-engine / cli-engine.js解析模块fs

  12. 12

    找不到模块:错误:无法解析“ ../aws-exports”(React-Native Expo Web)

  13. 13

    反应本机无法解析模块'module://react-native-screens.js

  14. 14

    React Native导入错误:无法使用.bin解析模块(如何导入某种类型的文件?)

  15. 15

    React Native-使用我制作的自定义组件时出现错误(错误:undefined无法解析模块<MyModule>)

  16. 16

    找不到模块:安装React Native Gesture Handler时无法解析'@ egjs / hammerjs'

  17. 17

    无法使用React解析打字稿模块

  18. 18

    React-Native错误:无法从“ index.js”解析模块“ / screen / Welcome”:

  19. 19

    无法从App.js解析模块-React Native

  20. 20

    react-native-community / CheckBox无法解析模块

  21. 21

    尝试在React Native中组织模块时无法解析模块

  22. 22

    React Native错误-无法解析模块`。/ tab-bar-item-ios`

  23. 23

    UnableToResolveError:无法解析模块`./node_modules/react-native/packager/src/components` React Native

  24. 24

    React-native 无法在导入 js 文件时解析模块

  25. 25

    图像路径 react-native:无法解析模块

  26. 26

    React Native 错误“无法解析模块‘react-native’”

  27. 27

    React Native Image 无法解析模块

  28. 28

    React Native 错误:无法解析模块`./index`

  29. 29

    React Native TypeScript:无法解析模块(但它存在)

热门标签

归档