7

I'm working on a React Native project and recently upgraded it from version 0.73 to 0.78.

Upgrade Process I Followed:

  • I created a brand-new React Native 0.78 project using the CLI.

  • Verified that the new project runs correctly on a device/emulator.

  • Transferred all necessary files and folders from my existing 0.73 project (like src/, assets, fonts, etc.).

  • Reinstalled all required dependencies manually, matching the original project's package.json.

The Issue:

When I run the app on a real device, it builds and launches, but I get the following runtime error in the app (not in the console):

[runtime not ready]: TypeError: Cannot read property 'style' of undefined js engine: hermes

This happens as soon as the app loads. There are no errors shown in Metro or the terminal.

5
  • Please edit your question to include a minimal reproducible example so that readers can run your code to answer your question. The issue is currently not reproducible. Commented Apr 7 at 7:06
  • The best practice update the repo from 0.73 to 0.78 instead creating a brand new 0.78 repo Commented Apr 7 at 7:48
  • 1
    Same here... on updating to new RN .79.0 Commented Apr 16 at 21:46
  • Same here after updating to RN 0.79.2 using the RN Upgrade helper and every recommended practice possible. Ran into some issues with the Bridging file and RNCPushNotificationIOS, but then after successfully fixing everything i get [runtime not ready]: TypeError: initialize is not a function (it is undefined), js engine: hermes Commented May 6 at 18:46
  • @klevisx Did you find the cause of your issue? Having the same with an upgrade to 0.80 and not finding anything Commented Jul 10 at 15:41

1 Answer 1

1

In my case, this was because of ViewPropTypes. React Native removed ViewPropTypes in 0.74 (along with a bunch of other PropTypes).

You need to find out which library is responsible. The line number that caused the error was shown in the error message on the device, so I built the dev bundle:

npx react-native bundle --platform ios --dev true --bundle-output temp-bundle.js --entry-file src/main.tsx

(replace src/main.tsx with your entry file), looked at the relevant line in the temp-bundle.js file, and found that the issue was caused by react-native-snap-carousel (workaround here, using patch-package).

Afterwards I grep'd my entire node_modules folder to check for any more uses of ViewPropTypes.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.