Monday, May 20, 2024
165
rated 0 times [  167] [ 2]  / answers: 1 / hits: 10766  / 4 Years ago, thu, september 3, 2020, 12:00:00

I wanted to use react-native-router-flux so i added its dependencies as described in its documents. I also added babel plugin dependency for react-native-reanimated in babel.config.js as below:


module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: ['react-native-reanimated/plugin'],};


But now im getting this error in metro server:



error: index.js: Cannot find module 'react-native-reanimated/plugin' from '/home/nia/Downloads/YarAb'



my react-native version is 0.63.2


More From » react-native

 Answers
3

unfortunately, expo sdk v38 doesn't support reanimated v2 yet, because "reanimated 2 only
supports hermes at the moment"
.


this problem is also documented in the react-native-reanimated v2 docs: "expo support is not ready yet, next sdk release will support react native 0.62 – this will allow you to use reanimated 2 in the ejected expo app."


the only solution for the moment is to either eject your expo app in order to use reanimated, or look for alternatives, like react-native-animatable.


https://github.com/software-mansion/react-native-reanimated/issues/886


[#2754] Sunday, August 30, 2020, 4 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tobyl

Total Points: 598
Total Questions: 110
Total Answers: 114

Location: Vietnam
Member since Sat, Feb 12, 2022
2 Years ago
tobyl questions
Tue, Aug 10, 21, 00:00, 3 Years ago
Wed, Jan 13, 21, 00:00, 3 Years ago
Tue, Dec 1, 20, 00:00, 4 Years ago
;