React Native常见报错汇总

Posted xiangzhihong8

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了React Native常见报错汇总相关的知识,希望对你有一定的参考价值。

问题1

创建新项目时,本地已经安装好pod,每次都要提示安装pod,然后又安装失败

npx react-native init AwesomeProject

如果本地安装的pod与rn默认的不一致,会报如下的错。

Installing dependencies
✔ CocoaPods (https://cocoapods.org/) is not installed. CocoaPods is necessary for the ios project to run correctly. Do you want to install it? › Yes, with gem (may require sudo)
✔ Installing CocoaPods
✖ Installing CocoaPods dependencies (this may take a few minutes)
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./Sample3/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
 

那么,我们可以在创建项目的时候跳过pod的安装。

npx react-native init AwesomeProject --skip-install

问题2

bundle install
Your

以上是关于React Native常见报错汇总的主要内容,如果未能解决你的问题,请参考以下文章

Presto SQL 常见报错汇总

Mysql 常见报错和疑问汇总

Mysql 常见报错和疑问汇总

struts2学习笔记——常见报错及解决方法汇总(持续更新)

JVM-Sandbox常见报错

typescript+vue踩过的坑-常见报错