简体   繁体   English

我在尝试运行 React Native 应用程序时遇到问题

[英]I have a problem when trying to run my react native app

as referenced in the react native docs, I am trying to run my react native app with the command npx react-native run-ios on terminal.正如 react native 文档中所引用的,我试图在终端上使用命令 npx react-native run-ios 运行我的 react native 应用程序。 However, I am getting this error:但是,我收到此错误: 在此处输入图片说明

How do I fix it?我如何解决它? I already tried deleting the build file in Xcode.我已经尝试删除 Xcode 中的构建文件。

It seems like you have executed the react-native link command.看起来您已经执行了 react-native link 命令。 From react-native 0.60.0, there is no need of linking the native dependencies manually.从 react-native 0.60.0 开始,不需要手动链接原生依赖。 Unlink the node modules that are causing the respective errors as suggested by Joshua Obritsch and run pod install again.按照 Joshua Obritsch 的建议取消链接导致相应错误的节点模块,然后再次运行 pod install。

You have manually linked libraries by doing react-native link but react-native 0.60 onwards linking is automatic.您通过执行 react-native link 手动链接了库,但是 react-native 0.60 以后的链接是自动的。 SO first do ,所以首先做,

react-native unlink react-native-gesture-handler
react-native unlink react-native-reanimated
react-native unlink react-native-screens

Then after that try pod install and it should be fine.然后在尝试pod install之后应该没问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试在 iOS 上运行 React Native 应用程序时出现 PhaseScriptExecutionError - PhaseScriptExecutionError when trying to run React Native app on iOS 当我在我的设备中运行我的React Native应用程序而未通过电缆在PC上连接时,它显示了2个月前的应用程序状态 - When I run my React Native app in my device without connecting on the pc via cable, it show the app state 2 month ago 当我尝试在 React Native 中导入我的组件时出错 - have an error when i try import my component in react native 我在退出 React Native 应用程序时遇到问题 - I have an issue in exiting react native app 如何在家庭网络外部的设备上运行我的react-native应用程序? - How can I run my react-native app on the device outside of my home network? 当我尝试从React Native iOS应用程序共享我的应用程序URL时,应用程序变得无响应 - App becomes unresponsive when I tried to share my app url from react native iOS app 为什么我的React Native应用程序无法在我的设备上运行 - Why won't my React Native app run on my device 如何让'react-native-cli'在指定的硬件中运行我的应用程序? - How do I get 'react-native-cli' to run my app in the specified hardware? 尝试发布React本机应用程序时Xcode出现问题 - Problem with xcode when try to publish a react native app Swift 尝试在 iOS 中运行到达本机应用程序时出错 - Swift error when trying to run a reach native app in iOS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM