Encountering Hermes errors while running npx react-native run-ios

I've been troubleshooting the npx react-native run-ins command for the last hour, encountering these persistent errors:

 ERROR  TypeError: undefined is not a function, js engine: hermes
 ERROR  Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Bridgeless Mode: false. Registered callable JavaScript modules (n = 9): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, HMRClient.
        A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes

Despite researching on GitHub, stack overflow, and seeking advice from friends, I have been unable to resolve the issue.

I attempted various solutions such as uninstalling and reinstalling pod files with commands like rm -rf Pods/ && rm -rf Podfile.lock && pod install, running pod update, clearing npm cache, uninstalling and reinstalling node_modules, and using Yarn for installation.

Answer №1

It seems that the error you are encountering is related to Hermes and likely stems from copying packages from an older project. This issue may be occurring because the latest SDK 48 uses Hermes as the default JavaScript Engine, while the files you copied may be from a project that is not on SDK 48.

Potential Solution:

If you prefer to use JavaScriptCore (JSC) as your default engine, make sure to specify this in your settings.

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

Comparing the benefits of injecting dependencies in the <head> section versus using package.json

In my HTML file, I currently have a bootstrap dependency included within the "head" tag, which references library files that I downloaded and physically added. Additionally, I have another bootstrap dependency listed in the package.json file through npm. ...

Utilizing React JS to Embed PDF Page Numbers in an Iframe: A Step-by-Step

How can I use reactjs to include pageno in an iframe? // If 'image' is available, show another iframe which allows setting the page number. <Iframe className="iframes" url={`${image}?page=2`} // Change '2' t ...

Module Ionic not found

When I attempt to run the command "ionic info", an error is displayed: [ERROR] Error loading @ionic/react package.json: Error: Cannot find module '@ionic/react/package' Below is the output of my ionic info: C:\Users\MyPC>ionic i ...

Building the Django+React app using `npm run build` is taking an extended amount of

As of late, I made the transition to React and have become quite familiar with it. Now, I have started integrating React with Django for backend support. After setting everything up, everything was working smoothly. However, every time I make changes to ...

"Starting npm in React.js doesn't seem to have any effect

Currently using Mac OS Catalina and Node 12.13.1, I am facing difficulties launching my React app. Upon entering $ npm start in my VS Code terminal, there is no response - no errors or problems encountered. In an effort to resolve this issue, I have atte ...

Oops! Looks like there was an error. The text strings need to be displayed within a <Text> component in the BottomTabBar. This occurred at line 132 in the

My app includes a bottomTab Navigation feature, but I encountered an error: Error: Text strings must be rendered within a <Text> component. This error is located at: in BottomTabBar (at SceneView.tsx:132) in StaticContainer in StaticCont ...

React Native - state hook refreshes and causes the component to re-render, yet no changes are visible

Here is the code snippet: export default () => { const [albums, setAlbums] = useState([]); useEffect(() => { MediaLibrary.getAlbumsAsync().then((tmpAlbums) => { setAlbums(tmpAlbums); }); }, []); return ( ...

Redux/React project bundle

I am currently attempting to incorporate the package https://www.npmjs.com/package/is-url into my React/Redux project, but I'm unsure about how to go about importing it. Are there any other ES6-compatible installation options that you would recommend ...

Substitute this.bindMethod for function component

I have a class component that is structured like this: interface MyProps { addingCoord: any resetCoords: any } interface MyState { x: any y: any } class DrawerOld extends React.Component<MyProps, MyState> { width: number height: number ...

To generate an npm package, you must convert several ES6 files into multiple ES5 files

I have developed various React components. Within my project folder, I have a collection of ES6 files including: components/A.js components/Button.js My goal is to import these components into my future projects in the following way: import A from &ap ...

Error: The command "SET" was not found in the `npm start` script

I encountered an issue while trying to run a React project. After running the command: npm start, I received the following error: sh: SET: command not found npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! &l ...

Issue: Unable to authenticate the initial certificate following the configuration of an id_rsa

Upon executing the commands below, I encountered an error while trying to start a nextJS app: ssh-keygen -t rsa -C "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c2afbba7afa3abae82a7baa3afb2aea7eca1adaf">[email pr ...

Steps to create a React Native application for testing purposes without relying on local dependencies

I am new to developing react-native apps and I have a question about sharing developed apps with other developers without local dependencies. Do we need an Apple developer account for a test build to be shared on iOS? How can this test build be created so ...

Encountering an issue with a Next.js app where it has become stuck during execution, the command "npm run dev

After successfully creating a simple next.js app and starting it with npm run dev, I encountered an issue when trying to start it for the second time: enter image description here Even after attempting to create a new project, the problem persisted. Inte ...

I successfully installed the Firebase tools using npm, but encountered an error during the process

Alert: Please choose at least one feature. Press SPACEBAR to select features, or mention a feature by executing firebase init [feature_name] ...

Exploring the origins: Unveiling the source code of a package installed using node or npm

When working with Python, I usually install a package using pip install django within a virtual environment. After installation, all the files are placed in the site-packages folder. From there, I can then import the package using from django.core import ...

What is the integration process of using Font Awesome with React?

After installing react-create-app using npm, I also added react-fontawesome. Now, I'm wondering how to include the css styles of fontawesome in my project? Here is a glimpse of my work space: https://i.stack.imgur.com/pM1g1.png ...

Having trouble utilizing the DatePicker component in my react native application

I've encountered an issue while using DatePicker in react native. Whenever I try to use it, an error pops up saying: "render error a date or time must be specified as value prop". Here is the link to my repository: my github repository const [date, se ...

Troubleshooting npm authorization problems

I've been experiencing permission challenges while attempting to install certain packages. For instance, I tried installing now-serve using the command npm install -g now-serve and encountered an EACCESS error as follows: npm WARN deprecated <a hr ...

Adjusting the height of a SelectField in ReactJS with MaterialUI

I have incorporated the React material-ui SelectField component into my webpage. Unfortunately, I am facing difficulty in adjusting the height of the select field. Below is a snippet of my code: <SelectField underlineStyle={{ display: 'none&a ...