React Native Getting this error 'Unrecognized operator abs'

Viewed 12239

enter image description here

Getting this error when adding react-navigation-drawer to my expo project, any idea how to fix this?

4 Answers

Faced this error few days back, I was able to fix it by running:

expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view

It is library version issue. Don't use 'yarn add react-native-gesture-handler react-native-reanimated' It will add react-native-reanimated@1.13.0 react-native-gesture-handler@1.7.0

Use 'expo install react-native-gesture-handler react-native-reanimated' It will add react-native-gesture-handler@~1.6.0 react-native-reanimated@~1.9.0

Close your IDE. Restart your computer.
Open your project, re-install you package (npm install).
re-run your project (react-native run-android)

It's because some of your installed packages are not matched with current version of Expo

In your terminal you will see a warning like

  • expo-av - expected version range: ~8.2.1 - actual version installed: ~8.7.0
  • expo-constants - expected version range: ~9.1.1 - actual version installed: ~9.3.3

To solve this issue you have to update all the packages according to the current expo version by running this command

expo install packageName@packageVersion   // expo install expo-av@8.2.1
Related