cli: ✖ Installing Bundler error Error: Looks like your iOS environment is not properly set.
Environment
info Fetching system and libraries information...
System:
OS: macOS 13.0.1
CPU: (8) arm64 Apple M1
Memory: 161.55 MB / 8.00 GB
Shell: 3.2.57 - /bin/sh
Binaries:
Node: 18.12.1 - /usr/local/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 9.4.2 - /usr/local/bin/npm
Watchman: 2023.01.23.00 - /usr/local/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_292 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Description
Issue Occurring on MAC OS M1 chip - I am not the only one with this: I opened this issue here on the react-native GitHub and was told this is a bug and post it here by @cortinico
- except I have Xcode installed and I have other projects using expo which run perfectly with simulators etc etc
✔ Downloading template
✔ Copying template
✔ Processing template
✖ Installing Bundler
error Ignoring ffi-1.15.4 because its extensions are not built. Try: gem pristine ffi --version 1.15.4
Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3
Ignoring ffi-1.14.2 because its extensions are not built. Try: gem pristine ffi --version 1.14.2
✖ Installing Bundler
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 (/private/var/root/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:129:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.initialize [as func] (/private/var/root/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:181:3)
at async Command.handleAction (/private/var/root/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js:106:9)
info Run CLI with --verbose flag for more details.
Version
10.1.3
Reproducible Demo
npx react-native init newProject
Snack, code example, screenshot, or link to a repository
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 28 (1 by maintainers)
Hey @laurencebedford, I fixed a similar issue by changing my Ruby version to the proper one. Please ensure you have this version of Ruby. What I did:
eval "$(rbenv init - zsh)"
at the end of the.zschr
file after installation. Optional: you might need to install Xcode dev tools, runxcode-select --install
in terminal.ruby-version
file, delete file and try againrbenv versions
docsnpx react-native@latest init AwesomeProject
I have the same issue in M2 chip, anyone help? i cant create new projects…
I had this issue too in an Intel Mac. Anyone know how to fix this?
Here is my solution.
I encounter this error as well although have probably set appropriate ruby version using
rbenv
.Turn out the error comes from dependency installations with
pod install
. The error did not displayed at all with the init project command.You guys can try
cd
to theproject/ios
and performpod install
to see if there is any error here and follow the instructions in the error messages. For me it just to dopod install --repo-update
manually 🎉following script fix it for me
brew install libffi
ln -s $(brew --cellar libffi)/*/include/ffi.h /usr/local/include/ffi.h
ln -s $(brew --cellar libffi)/*/include/ffitarget.h /usr/local/include/ffitarget.h
referred to this thread: https://github.com/ffi/ffi/issues/814#issuecomment-677655537hey @Visharada we’d appreciate some help from you on this one 😃
Translation:
I also had this problem on an Intel Mac. Does anyone know how to fix this thing? Me too, really speechless, the official cli has a problem, and the imac m1 has the same problem
This is completely correct this issue is leaving M1 chip users screwed over currently.
Looks like bundler installation failed for you. Could you try solution proposed here?