请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

老师,运行npx react-native init 的时候会报错

✔ Downloading template
✔ Copying template
✔ Processing template
⠋ Updating CocoaPods repositories (this may take a few minutes) remote: Enumera remote: Enumerating objects: 82072, done.
remote: Counting objects: 100% (82072/82072), done.
remote: Compressing objects: 100% (498/498), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

✖ Updating CocoaPods repositories (this may take a few minutes)
✖ Updating CocoaPods repositories (this may take a few minutes)
error Error: Failed to update CocoaPods repositories for iOS project.
Please try again manually: “pod repo update”.
CocoaPods documentation: https://cocoapods.org/

正在回答 回答被采纳积分+3

1回答

今朝 2020-04-17 19:56:43

可能需要先执行sudo gem install cocoapods,如果还是不行的话,

可以执行

npx @react-native-community/cli doctor 

这个命令会检查你的开发环境中的错误,并尝试自动修复

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号