Animated node with ID 2 already exists

Viewed 7709

enter image description here

package.json

 {
  "main": "node_modules/expo/AppEntry.js",
  "homepage": "<My URL>",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "deploy": "gh-pages -d web-build",
    "predeploy": "expo build:web"
  },
  "dependencies": {
    "@react-native-community/masked-view": "0.1.6",
    "@react-navigation/bottom-tabs": "^5.2.6",
    "@react-navigation/drawer": "^5.8.2",
    "@react-navigation/native": "^5.1.5",
    "@react-navigation/stack": "^5.2.10",
    "axios": "^0.19.2",
    "expo": "^37.0.11",
    "modal-react-native-web": "^0.2.0",
    "react": "~16.9.0",
    "react-dom": "~16.9.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
    "react-native-actionsheet": "^2.4.2",
    "react-native-dialogbox": "^0.6.10",
    "react-native-elements": "^1.2.7",
    "react-native-image-view": "^2.1.9",
    "react-native-modal": "^11.5.6",
    "react-native-reanimated": "~1.7.0",
    "react-native-safe-area-context": "^0.7.3",
    "react-native-screens": "~2.2.0",
    "react-native-skeleton-content": "^1.0.13",
    "react-native-swipeout": "^2.3.6",
    "react-native-tab-view": "^2.14.0",
    "react-native-vector-icons": "^6.6.0",
    "react-native-web": "~0.11.7",
    "react-redux": "^7.2.0",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0"
  },
  "devDependencies": {
    "@babel/core": "^7.8.6",
    "@expo/webpack-config": "^0.12.11",
    "babel-preset-expo": "~8.1.0"
  },
  "private": true
}

6 Answers

Make sure your package lock or yarn lock don't still include references to older versions of react-native-reanimated

for me react-native-skeleton was still referencing to an old reanimated version.

If anyone is still experiencing this problem, especially after installing react-native-skeleton, all you need to do is to run:

yarn add react-native-reanimated@1.9.0

In my case, I have another package that has a dependency with react-native-reanimated with a specific version. You need to update react-native-reanimated to that version. Check this comment by jakub-gonet to Animated node with ID 2 already exists #1072:

This is most likely caused by two instances of reanimated running simultaneously.

yarn upgrade react-native-reanimated

worked for me

check the package.lock file, it has two reanimated plugins, so delete the old version and also delete the node_modules, then give yarn install or npm install and run the app

Delete the react-native-reanimated fileby

yarn remove react-native-reanimated

This solved my problem

Related