reactnativecn / react-native-website

React Native 中文网
https://reactnative.cn
MIT License
216 stars 327 forks source link

npx react-native init AwesomeProject 项目创建出错 #651

Closed pythonName closed 1 year ago

pythonName commented 1 year ago
              Welcome to React Native!
             Learn once, write anywhere

✔ Downloading template ✔ Copying template ✔ Processing template ✖ 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 ./AwesomeProject/ios && pod install". CocoaPods documentation: https://cocoapods.org/

这是什么原因?

sunnylqm commented 1 year ago
image
yuanyuanzi718 commented 1 year ago

1.你要有VPN 2.执行这句 cd ./AwesomeProject/ios && pod install 3.我也卡在这但我因为电脑的原因还没有VPN,这是我查询的,如果你弄好了你回复我一下,嘻嘻. @pythonName

ZhuTianQiang commented 1 year ago

Installing CocoaPods dependencies (this may take a few minutes) error warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md

ZhuTianQiang commented 1 year ago

Installing CocoaPods dependencies (this may take a few minutes) error Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS. Error: Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS. at createFromTemplate (/Users/manmacho/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:169:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.initialize [as func] (/Users/manmacho/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:222:3) at async Command.handleAction (/Users/manmacho/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js:140:9) info Run CLI with --verbose flag for more details.

sunnylqm commented 1 year ago

就一条:必须使用代理,且代理必须对命令行生效

ZhuTianQiang commented 1 year ago

就一条:必须使用代理,且代理必须对命令行生效

用啥代理

sunnylqm commented 1 year ago
image
BaoziSwifter commented 1 year ago
截屏2022-12-20 下午9 44 46

w我这里有个类似的错误 但是我的ruby版本已经是2.7.5 但是还是提示不匹配

sunnylqm commented 1 year ago

你这是完全不同的错误,需要配置一些ruby环境管理器(例如rbenv,asdf等等,这部分英文文档有说明,中文的还没更新)