【问题标题】:Why isn't react navigation working in react native?为什么反应导航不能在反应原生中工作?
【发布时间】:2020-08-30 03:22:18
【问题描述】:

我试过“npm install --save react-navigation” 并得到一堆错误: npm 错误!代码ENOENT npm 错误!系统调用重命名 npm 错误!路径 C:\Users\hoppe\rn-meal-app\node_modules@react-navigation\core\node_modules\hoist-non-react-statics npm 错误! dest C:\Users\hoppe\rn-meal-app\node_modules@react-navigation\core\node_modules.hoist-non-react-statics.DELETE npm 错误!错误号 -4058 npm 错误! enoent ENOENT:没有这样的文件或目录,重命名 'C:\Users\hoppe\rn-meal-app\node_modules@react-navigation\core\node_modules\hoist-non-react-statics' -> 'C:\Users\ hoppe\rn-meal-app\node_modules@react-navigation\core\node_modules.hoist-non-react-statics.DELETE' npm 错误! enoent 这与 npm 找不到文件有关。 npm 错误!恩恩特

npm 错误!可以在以下位置找到此运行的完整日志: npm 错误! C:\Users\hoppe\AppData\Roaming\npm-cache_logs\2020-08-30T02_38_23_800Z-debug.log

【问题讨论】:

标签: react-native


【解决方案1】:

对于安装 --react-navigation-- 你需要安装一些包依赖,比如:

  • react-native-reanimated
  • react-native-gesture-handler
  • react-native-screens
  • react-native-safe-area-context
  • @react-native-community/masked-view

你可以用这个来安装它:

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

更多阅读请参阅Link

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-17
    • 2021-03-23
    • 2017-06-09
    • 2020-11-26
    • 1970-01-01
    相关资源
    最近更新 更多