Dana Kenzhebaeva
Dana Kenzhebaeva

Reputation: 131

it shows when I start expo project, so how can I fix this?

[Reanimated] Mismatch between JavaScript part and native part of Reanimated (3.0.2 vs. 2.14.4). Did you forget to re-build the app after upgrading react-native-reanimated? If you use Expo Go, you must downgrade to 2.14.4 which is bundled into Expo SDK.

ERROR TypeError: Cannot read property 'create' of undefined, js engine: hermes

ERROR Invariant Violation: "main" has not been registered. This can happen if:

* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.

* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

Upvotes: 12

Views: 30798

Answers (7)

mosidrum
mosidrum

Reputation: 341

Uninstall react-navtive-reanimated and re-install install using npx and expo

npx expo install react-native-reanimated

Upvotes: 0

Rahul Kumar Singh
Rahul Kumar Singh

Reputation: 11

This happens when there is a mismatch between version of reanimated . To Fix------- We have to make the version same ,so run npm i react-native-reanimated@version of native part,this will make your react-native-reanimated version same as one on your native device.

Upvotes: 1

Ced
Ced

Reputation: 17377

Note that if you are using expo you must install the exact version bundled with expo. The simplest way to do that is :

npx expo install react-native-reanimated

Upvotes: 8

Hasan Dag
Hasan Dag

Reputation: 51

I've tried a lot too. This solution worked for me.

  1. Delete node_modules folder

  2. Run "npm install [email protected]"

  3. Dependency version not starting with tilde(~) or caret(^) see also

    "dependencies": { ... "react-native-reanimated": "3.3.0" ... }

  4. Run npm install

  5. Run npx expo start --reset-cache

Upvotes: 4

Musema
Musema

Reputation: 105

I faced the same issue, resolved by adding resolution to package.json, which decides which version of the package should be used when this kind of conflicts occure.

  "resolutions": {
    "react-native-reanimated": "3.3.0"
  }

Upvotes: 3

mozal
mozal

Reputation: 131

Firstly; run npm install [email protected]

After; start with expo start -c

Upvotes: 12

Oscar Chua Wei Wen
Oscar Chua Wei Wen

Reputation: 87

if u are using expo, there might be facing this kind of version issues due to differences between react native cli. The solution that u can try is to change your dependencies version of react native reanimated in package json to "react-native-reanimated": "^2.14.4", and run npm install. Last try to run command: expo start -c to reset the cache in your app and it will works perfectly fine!

Upvotes: 1

Related Questions