thecodingmachine / react-native-boilerplate

A React Native template for building solid applications 🐙, using JavaScript 💛 or Typescript 💙 (you choose).
https://thecodingmachine.github.io/react-native-boilerplate/
MIT License
4.75k stars 864 forks source link

Help for install, ffi problems on M1 #356

Closed GeoffreyOlivier closed 1 year ago

GeoffreyOlivier commented 1 year ago

Hello, sorry to ask help here, since two day I try to install this boilerplate. I fixed many error, but one still there. I can't put label help :/

Environnement

I work on apple M1, node v20.1.0 ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [arm64-darwin22] ffi (1.15.5) cocoapods-core (1.12.1) cocoapods-deintegrate (1.0.5) cocoapods-downloader (1.6.3) cocoapods-plugins (1.0.0) cocoapods-search (1.0.1) cocoapods-trunk (1.6.0) cocoapods-try (1.2.0) bundler (default: 2.1.4)

Error

`✖ Installing Bundler error Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /Users/jeff/Documents/Documents - MBP-jeff/DEV.nosync/todoleafRN/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c /Users/jeff/.rvm/rubies/ruby-2.7.6/bin/ruby -I /Users/jeff/.rvm/rubies/ruby-2.7.6/lib/ruby/2.7.0 -r ./siteconf20230509-4958-qoj6zw.rb extconf.rb 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 checking for whether -Wl,--exclude-libs,ALL is accepted as LDFLAGS... no checking for whether -pthread is accepted as LDFLAGS... yes creating extconf.h creating Makefile

current directory: /Users/jeff/Documents/Documents - MBP-jeff/DEV.nosync/todoleafRN/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c make "DESTDIR=" clean

current directory: /Users/jeff/Documents/Documents - MBP-jeff/DEV.nosync/todoleafRN/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5/ext/ffi_c make "DESTDIR=" /bin/sh: -c: line 0: unexpected EOF while looking for matching `"' /bin/sh: -c: line 1: syntax error: unexpected end of file make: *** ["/Users/jeff/Documents/Documents] Error 2

make failed, exit code 2

Gem files will remain installed in /Users/jeff/Documents/Documents - MBP-jeff/DEV.nosync/todoleafRN/vendor/bundle/ruby/2.7.0/gems/ffi-1.15.5 for inspection. Results logged to /Users/jeff/Documents/Documents - MBP-jeff/DEV.nosync/todoleafRN/vendor/bundle/ruby/2.7.0/extensions/arm64-darwin-22/2.7.0/ffi-1.15.5/gem_make.out

An error occurred while installing ffi (1.15.5), and Bundler cannot continue. Make sure that gem install ffi -v '1.15.5' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile: cocoapods was resolved to 1.11.3, which depends on cocoapods-core was resolved to 1.11.3, which depends on typhoeus was resolved to 1.4.0, which depends on ethon was resolved to 0.16.0, which depends on ffi

✖ 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 (/Users/jeff/.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/jeff/.npm/_npx/dea611a43221eddd/node_modules/@react-native-community/cli/build/commands/init/init.js:184:3) at async Command.handleAction (/Users/jeff/.npm/_npx/dea611a43221eddd/node_modules/@react-native-community/cli/build/index.js:106:9) info Run CLI with --verbose flag for more details. `

duyanhla commented 10 months ago

Hi @GeoffreyOlivier, how did you handle to fix this, I face the same issue, thanks