I'm currently trying to create my first ever react native project, following the environment setup directions on https://reactnative.dev. I followed every step of the quickstart guide. The error appears when I try to do the step "creating a new application", with the command npx react-native@latest init MyProject, at which point I get the following error message:
error warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.6.0/gems/cocoapods-core-1.12.1/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
✖ 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/myname/.npm/_npx/dea611a43221eddd/node_modules/@react-native-community/cli/build/commands/init/init.js:131:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.initialize [as func] (/Users/myname/.npm/_npx/dea611a43221eddd/node_modules/@react-native-community/cli/build/commands/init/init.js:184:3) at async Command.handleAction (/Users/myname/.npm/_npx/dea611a43221eddd/node_modules/@react-native-community/cli/build/index.js:106:9)
I'm not sure what to do next. I ran npm uninstall -g react-native-cli @react-native-community/cli before trying to initialize my project, if that matters.
I'm using: yarn = 3.5.0, cocoa pod = 1.12.1, node = 18.15.0, ruby = 2.6.10p210