您当前的位置: 首页 >  react native

xiangzhihong8

暂无认证

  • 1浏览

    0关注

    1324博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

React Native常见报错汇总

xiangzhihong8 发布时间:2022-08-24 14:25:50 ,浏览量:1

问题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
关注
打赏
1482932726
查看更多评论
立即登录/注册

微信扫码登录

0.0767s