frontend-collective / react-sortable-tree

Drag-and-drop sortable component for nested data and hierarchies
https://frontend-collective.github.io/react-sortable-tree/
MIT License
4.9k stars 897 forks source link

React version dependency issue #924

Open GadgetGeekUK opened 2 years ago

GadgetGeekUK commented 2 years ago

On install I get the following:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: vuexy-react-admin-dashboard@8.0.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.3.0" from react-sortable-tree@2.8.0
npm ERR! node_modules/react-sortable-tree
npm ERR!   react-sortable-tree@"*" from the root project
murfett-au commented 2 years ago

I also get this error using React 17. Here is my package.json

{
  "name": "client-no-cra",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "webpack-dev-server --open",
    "create": "webpack",
    "relay": "relay-compiler $@",
    "relay-watch": "relay-compiler --watch",
    "flow": "flow"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "css-loader": "^6.6.0",
    "file-loader": "^6.2.0",
    "flow-bin": "^0.171.0",
    "graphql": "^16.3.0",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-relay": "^13.1.0",
    "react-router-dom": "^6.2.1",
    "relay-runtime": "^13.1.0",
    "style-loader": "^3.3.1",
    "styled-components": "^5.3.3"
  },
  "devDependencies": {
    "@babel/cli": "^7.17.0",
    "@babel/core": "^7.17.0",
    "@babel/plugin-transform-runtime": "^7.17.0",
    "@babel/preset-env": "^7.16.11",
    "@babel/preset-flow": "^7.16.7",
    "@babel/preset-react": "^7.16.7",
    "babel-loader": "^8.2.3",
    "babel-plugin-relay": "^13.1.0",
    "babel-plugin-styled-components": "^2.0.2",
    "html-webpack-plugin": "^5.5.0",
    "relay-compiler": "^13.1.0",
    "webpack": "^5.68.0",
    "webpack-cli": "^4.9.2",
    "webpack-dev-server": "^4.7.4"
  },
  "relay": {
    "src": "./src",
    "schema": "../schema/schema.for.reference.graphql",
    "exclude": [
      "**/node_modules/**",
      "**/__mocks__/**",
      "**/__generated__/**"
    ]
  }
}
nosferatu500 commented 2 years ago

https://www.npmjs.com/package/@nosferatu500/react-sortable-tree

React 17 (fork)

Imaginativeone commented 2 years ago

@nosferatu500 Does your fork resolve the React dependency issues?

nosferatu500 commented 2 years ago

@Imaginativeone My fork has no issues with deps. I think you can get a warning in the case of React 18. In theory, it should work out of the box, but I have not tested it yet.

FullstackJack commented 1 year ago

I don't like that we're now resorting to custom forks. Project owner should delegate maintenance of this repo to the community.