React Native ID为2的动画节点已存在

a9wyjsp7  于 2023-08-07  发布在  React
关注(0)|答案(7)|浏览(131)


的数据
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
}

字符串

xzlaal3s

xzlaal3s1#

确保包锁或Yarn锁不再包含对react-native-reanimated的旧版本的引用
对我来说,react-native-skeleton仍然是一个旧的复活版本。

uqxowvwt

uqxowvwt2#

如果有人仍然遇到这个问题,特别是在安装react-native-skeleton之后,你需要做的就是运行:

yarn add react-native-reanimated@1.9.0

字符串

h7appiyu

h7appiyu3#

yarn upgrade react-native-reanimated

字符串
为我工作

dgjrabp2

dgjrabp24#

对于这里的新手,检查您的package-lock.json并查找其他包依赖项中列出的react-native-reanived版本,检查匹配所有的版本并检查您在package.json中的版本,卸载当前的版本并从package-lock.json文件中安装。在锁文件中,所有包中的版本都是2.12.0,而package.json中的版本是2.14.0,所以我必须安装2.12.0。

bjp0bcyl

bjp0bcyl5#

在我的例子中,我有另一个包,它依赖于react-native-reanimated,并使用特定版本。您需要将react-native-reanimated更新到该版本。查看jakub-gonetAnimated node with ID 2 already exists #1072的评论:
这很可能是由于同时运行两个重新设置的示例而导致的。

ajsxfq5m

ajsxfq5m6#

检查package.lock文件,它有两个重新动画的插件,因此删除旧版本并删除node_modules,给予yarn或npm并运行应用程序

jei2mxaa

jei2mxaa7#

删除react-native-reanimated文件
yarn remove react-native-reanimated
这解决了我的问题

相关问题