Closed starterProgrammer closed 1 year ago
:warning: | Add or Reformat Version Info |
---|---|
:information_source: | We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2 |
sudo xcodebuild -license accept
ruby -rrbconfig -e 'puts RbConfig::CONFIG["rubyhdrdir"]'
install port at first from here
sudo port install libffi
OR try with brew
brew install libffi
I had this same error on macOS Monterey 12.6.2 with Xcode 13.4, Xcode 14.0.1 and Xcode 14.2 installed. Changing the default Xcode (Xcode / Preferences / Locations - "Command Line Tools:) from the latest (14.2) to 13.4 and trying again was successful. With 14.2 as the default: sudo gem install cocoapods -v 1.11.2 => #fail sudo gem install cocoapods => #fail (different error message) After changing to 13.4 as the default: sudo gem install cocoapods -v 1.11.2 => success, and pod --version => 1.11.2
I had this issue today. install GCC prior to executing bundle install
bundle config --local build.ffi --with-cflags=-Wno-error=implicit-function-declaration
bundle install
That's a duplicate of https://github.com/facebook/react-native/issues/37183
That's a duplicate of #37183 there is not perfect and complete soulution for this issue there...
i fixed this issue but happening again every time i start refresh react native app
1- npx react-native init testproject --skip-install -—npm 2- cd testproject 3- npm install or yearn install 4- cd ios 5- bundle config --local build.ffi --with-cflags=-Wno-error=implicit-function-declaration 6- bundle install 7- bundle exec pod install
Description
i am trying to install react native and give many errors for two days.please help me to fix my errors I tried to install everythings are explained here 'https://reactnative.dev/docs/environment-setup?guide=native' but at least when i run init project gives me error
error Your RubyGems version (3.0.3.1) has a bug that prevents
required_ruby_versionfrom working for Bundler. Any scripts that use
gem install bundlerwill break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running
gem update --system 3.2.3Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/apple/Desktop/template/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20230508-4891-11u18l.rb extconf.rb --enable-system-libffi checking for ffi_prep_closure_loc() in -lffi... no checking for ffi_prep_closure_loc() in -llibffi... no checking for ffi_prep_closure_loc() in -llibffi-8... no system libffi is not usable *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME) --with-ffi_c-dir --without-ffi_c-dir --with-ffi_c-include --without-ffi_c-include=${ffi_c-dir}/include --with-ffi_c-lib --without-ffi_c-lib=${ffi_c-dir}/lib --enable-system-libffi --with-libffi-config --without-libffi-config --with-pkg-config --without-pkg-config --with-ffilib --without-ffilib --with-libffilib --without-libffilib --with-libffi-8lib --without-libffi-8lib To see why this extension failed to compile, please check the mkmf.log which can be found here: /Users/apple/Desktop/template/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/ffi-1.15.5/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Users/apple/Desktop/template/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5 for inspection. Results logged to /Users/apple/Desktop/template/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/ffi-1.15.5/gem_make.out /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
run' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:47:inblock in build' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
open' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:inbuild' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
block in build_extension' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:inmon_synchronize' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
build_extension' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:inblock in build_extensions' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
each' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:inbuild_extensions' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
build_extensions' /Users/apple/.gem/ruby/2.6.0/gems/bundler-2.4.12/lib/bundler/rubygems_gem_installer.rb:72:inbuild_extensions' /Users/apple/.gem/ruby/2.6.0/gems/bundler-2.4.12/lib/bundler/rubygems_gem_installer.rb:28:in
install' /Users/apple/.gem/ruby/2.6.0/gems/bundler-2.4.12/lib/bundler/source/rubygems.rb:198:ininstall' /Users/apple/.gem/ruby/2.6.0/gems/bundler-2.4.12/lib/bundler/installer/gem_installer.rb:54:in
install' /Users/apple/.gem/ruby/2.6.0/gems/bundler-2.4.12/lib/bundler/installer/gem_installer.rb:16:ininstall_from_spec' /Users/apple/.gem/ruby/2.6.0/gems/bundler-2.4.12/lib/bundler/installer/parallel_installer.rb:156:in
do_install' /Users/apple/.gem/ruby/2.6.0/gems/bundler-2.4.12/lib/bundler/installer/parallel_installer.rb:147:inblock in worker_pool' /Users/apple/.gem/ruby/2.6.0/gems/bundler-2.4.12/lib/bundler/worker.rb:62:in
apply_func' /Users/apple/.gem/ruby/2.6.0/gems/bundler-2.4.12/lib/bundler/worker.rb:57:inblock in process_queue' /Users/apple/.gem/ruby/2.6.0/gems/bundler-2.4.12/lib/bundler/worker.rb:54:in
loop' /Users/apple/.gem/ruby/2.6.0/gems/bundler-2.4.12/lib/bundler/worker.rb:54:inprocess_queue' /Users/apple/.gem/ruby/2.6.0/gems/bundler-2.4.12/lib/bundler/worker.rb:90:in
block (2 levels) in create_threads' An error occurred while installing ffi (1.15.5), and Bundler cannot continue. In Gemfile: cocoapods was resolved to 1.12.1, which depends on cocoapods-core was resolved to 1.12.1, which depends on typhoeus was resolved to 1.4.0, which depends on ethon was resolved to 0.16.0, which depends on ffi 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/apple/.npm/_npx/7930a8670f922cdb/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/apple/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:184:3) at async Command.handleAction (/Users/apple/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js:106:9)`After this error created a folder with enesial react native codes but does not run at all
My macbook pro mid 2015
React Native Version
0.71 latest version (i run react-native@latest)
Output of
npx react-native info
error: unknown command 'info' (Did you mean init?)
Tried to update rubygem but
Steps to reproduce
these things make problem cocopods bundle install ruby
Snack, code example, screenshot, or link to a repository
just run simple command in terminal
npx react-native@latest init AwesomeProject