4

I have a Expo React Native app using Expo SDK 49.

I updated to Expo SDK 50 and made no other changes than those packages recommended.

I get the following error: Cannot find native module 'ExpoApplication', js engine: hermes

When I have this code: import * as Application from "expo-application"; ...

    <AboutText
        label="Native build version"
        info={Application.nativeBuildVersion}
        ></AboutText>`

I have re-installed and I have this in package.json

    "expo": "50",
    "expo-application": "~5.8.4",

Any suggestions?

3 Answers 3

2

The person who asked the question stated that he stopped looking for a solution and solved the problem by switching to Expo SDK 51.

I would like to make a suggestion for those who have similar problems with Expo 51 or other versions.

If you are getting the error "Cannot find native module Expo...". The version of the package you are getting the error from may not be compatible with the SDK you are using. You can use the following command to understand this:

npx expo-doctor

If the above command tells you that you have incompatible dependencies with the SDK, you can see which packages are incompatible with the following command and switch to the compatible version with the --fix parameter.

npx expo install --check
Sign up to request clarification or add additional context in comments.

1 Comment

I neglected to say that I tried that and it did not work. I ran doctor and fixed any incompatible versions. I had a very clean build with Expo SDK 50. I would agree with you that if you have issues when you go to a new version you should check for incompatibilities.
1

I gave up trying to find a solution with Expo SDK 50. The solution is to update to SDK 51.

I updated to SDK 51 (Expo recommends that you update incrementally - I should have ignored their suggestions and saved a lot of time). No problems now. The code that worked on SDK 49 now works unchanged on Expo SDK 51. I saw nothing in the change logs to reflect this problem.

Comments

1

For me the issue was that i recently added the package expo-auth-session to use Google Sign in, but I never re-built the app into a new development build. expo-auth-session is a native package so this is required after you install it. I am not sure why it was giving me the "Cannot find native package ExpoApplication" error.

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.