react-native - 为什么反应导航不能在反应原生中工作?
问题描述
我尝试了“npm install --save react-navigation”并得到了一堆错误:npm ERR!代码 ENOENT npm 错误!系统调用重命名 npm ERR!路径 C:\Users\hoppe\rn-meal-app\node_modules@react-navigation\core\node_modules\hoist-non-react-statics npm ERR!dest C:\Users\hoppe\rn-meal-app\node_modules@react-navigation\core\node_modules.hoist-non-react-statics.DELETE npm ERR!errno -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 ERR!C:\Users\hoppe\AppData\Roaming\npm-cache_logs\2020-08-30T02_38_23_800Z-debug.log
解决方案
对于安装 --react-navigation-- 您需要安装一些包依赖项,例如:
- react-native-reanimated
- 反应本机手势处理程序
- 反应原生屏幕
- 反应原生安全区域上下文
- @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
更多阅读请参见链接
推荐阅读
- excel - 计算数据集和另一列中特定标准的公式
- node.js - 设置后无法发送标头
- java - 在java中使用Enum来存储一组固定的可变对象
- python - Moblenet V2:将生产者版本较低的图导入生产者版本较高的图
- mongodb - 如何在 mongodb 中搜索嵌入的文档?
- python - 在 django admin 中为每个用户分配一个单独的 html 页面
- javascript - React Data Grid 在取消过滤后不保留更改
- bash - 覆盖 cd 命令以保存 bash zsh 历史记录的绝对路径
- c# - 如何链接两个期望您提供流的 C# API?
- asn.1 - ASN.1 BER Encode Integer 0x10000000FFFFFFFC 不定长度编码