Gem::Ext::BuildError: ERROR: Gem native extension build encountered an error and could not be completed

Trying to initiate a fresh project using this command:

npx react-native init AwesomeProject 

The project is successfully created, but there seems to be an issue with the bundler.

✖ Installing Bundler

error Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

// Error message continues...

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

✖ 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.

Running CLI with --verbose flag may provide more details.

Despite trying to install cocopods gem nodejs and various other commands, as well as referring to documentation, the error persists.

Answer №1

My issue was resolved by executing the commands below

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

This solution can be found in this discussion: ffi/ffi#814 (comment)

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is causing my Vue leave transition to malfunction?

Currently, I am utilizing vee validate for my form validation. Specifically, I have implemented vue transition to handle the display of validation errors in the following manner: <input type="text" name="name" v-validate="'required'"> < ...

Page experiencing issues with JavaScript functionality

Here is a simple function that I am using to shake a form when the user's email is not valid: function shakeForm() { var l = 10; for( var i = 0; i < 10; i++ ) $("form").animate( { 'margin-left': "+=" + ( l = -l ) + 'px ...

Limiting input characters in UITextView using textViewDidChange

Is there a way to constrain the input in a UITextView to only Doubles, with each Double separated by a space and allowing for only one decimal point? I've tried code that removes letters and symbols, but it's not functioning properly when it come ...

Every time an input is altered, the onClick function is invoked

I am facing an issue while trying to send data to a local server using an onclick function. Every time the input field is changed, the function gets called unnecessarily and I can't seem to figure out why this is happening. const sendDataToServer = () ...

The distribution platform is not delivering push notifications as expected

I successfully set up push notifications for the developer certificate, but I'm having trouble getting it to work for ad hoc testing with a friend. I followed the same process for creating the push notification keys/certificates, except this time I se ...

Issue with Material UI dropdown not selecting value on Enter key press

I have encountered an issue with the material UI dropdown component that I am using. When I navigate through the dropdown options using arrow keys and press enter, the selected value does not get highlighted. Below is the code snippet for the dropdown: ...

Encountering crashes on my iOS app every time I attempt to click the Google Sign

As I integrate the Google Sign-In library for iOS, I encounter a crash when clicking the Sign-In button, resulting in the error message: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Your app must support ...

Sending an array of strings from an ajax call to an MVC controller

I'm encountering an issue where I have an array that I build up when a row is selected in my bootstrap data table. The problem arises when I try to pass this array from my view to the controller, which is supposed to fire up a partial view. Strangely, ...

When utilizing the get method to invoke a JavaScript function, IE imposes a restriction of 2083 characters

I need assistance with passing a lengthy XML string to a JavaScript function. Currently, the process involves using an XSL file to generate HTML code which includes a link that triggers the function like this. <a href="javascript:myFunctionName('l ...

What is the best way to create the "hidden text" illusion using CSS?

Is there a way to create the 'text behind color effect' using CSS? https://i.sstatic.net/2T0ee.png https://i.sstatic.net/d6VC9.png https://i.sstatic.net/Slnzn.png ...

Troubleshooting form errors with jQuery AJAX on form submissions

Below is a form that I have: <form name="frm_dcg" id="frm_dcg" method="post" enctype="multipart/form-data" action="" onsubmit="return validate_form();" > <div class="login-form"> <div class="sign-in-htm"> -----------other cod ...

Can anyone provide guidance on creating a Jest test for an authenticated Express endpoint?

I have been working on a seemingly straightforward 4-file toy solution that I thought was simple. I am looking to write a Jest test for the '/bingo' route in bingo.js which requires authentication. Below are the four files that make up this setup ...

creating folding effect using javascript and css with divs

I've been searching high and low on the internet for a solution like this, but so far I haven't had any luck. It seems like there might be a JavaScript script out there that dynamically changes the css -webkit-transform: rotateY(deg) property. ...

Having trouble with the nav-item dropdown functionality on Laravel Vue?

Currently utilizing Laravel and Vue.js along with AdminLTE. Initially it was functioning properly, but now... head <!-- Font Awesome Icons --> <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css"> <!-- Theme style --> ...

Generating CSS stylesheet from a string variable

Can a CSS file be created from a string data retrieved from the controller class in my application? I am working on a JSP page and need to access a CSS variable like this: <link rel="stylesheet" type="text/css" href="/Style/css=${css}" /> The "Sty ...

the cached token retrieved by adal is consistently empty

To retrieve a cached token, I am utilizing the react-adal api import { authContext, } from '../auth' const AvatarContainer = () => { getPersonPhoto(authContext) return ( <Avatar /> ) } async function getPersonPhoto(au ...

Ways to extract innerHTML content from a loaded element generated by using the .load() method

Check out the code snippet below: template.html : <div id="nav"> Welcome to Space </div> layout.html : <div id="content"> </div> $('#content').load("template.html #nav"); ale ...

Transform the values of an array within a JSON object into a single string by looping through them

Here is a JSON object that I need to transform: // TableData { "0": { "damage_type": "Scratch", "regions": [ "front side", "back side" ], ...

What is the best way to transmit the server response information from a fetch API to the client?

After receiving a response with the expected results from an API call using fetch API and a json object, I am looking for ways to send these results to the client in order to display them on the interface. The server-side operation was conducted through th ...

What is the best way to determine if a Google Apps user is not an administrator?

We have developed an app for Google Apps and incorporated the "Integrate with Google" button [https://developers.google.com/apps-marketplace/button]. One issue we're facing is that when a user clicks on this button, they must be an administrator. Howe ...