ID 为 2 的动画节点已存在

问题描述 投票:0回答:8

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
}

react-native
8个回答
9
投票

确保您的包锁或纱线锁不再包含对旧版本

react-native-reanimated

的引用

对我来说

react-native-skeleton
仍然引用旧的复活版本。


2
投票

如果有人仍然遇到这个问题,特别是安装后

react-native-skeleton
,你需要做的就是运行:

yarn add [email protected]

1
投票
yarn upgrade react-native-reanimated

为我工作


1
投票

对于新人,请检查您的 package-lock.json 并查找其他包依赖项中列出的react-native-reanimated版本,检查与所有匹配的版本并检查您在 package.json 中的版本,卸载当前版本并安装 package-lock.json 文件中的一个。 就我而言,在锁定文件中,所有包中的版本都是 2.12.0,而在 package.json 中我有 2.14.0,所以我必须安装 2.12.0。


0
投票

就我而言,我有另一个包,它与特定版本的react-native-reanimated有依赖关系。 您需要将react-native-reanimated更新到该版本。 检查 jakub-gonet评论ID 2 的动画节点已经存在#1072:

这很可能是由两个同时运行的实例引起的。


0
投票

检查package.lock文件,它有两个重新启动的插件,所以删除旧版本 并删除node_modules,然后进行yarn install或npm install并运行应用程序


0
投票

删除react-native-reanimated文件

yarn 删除react-native-reanimated

这解决了我的问题


0
投票

答案很简单,您安装的软件包的重生版本高于您当前获得的重生版本,升级重生软件包等于软件包版本或降级软件包(如果有),这样版本就不会冲突

© www.soinside.com 2019 - 2024. All rights reserved.