Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This library is not supporting with React 16+ version #254

Open
afsal-kk opened this issue Apr 6, 2022 · 10 comments
Open

This library is not supporting with React 16+ version #254

afsal-kk opened this issue Apr 6, 2022 · 10 comments

Comments

@afsal-kk
Copy link

afsal-kk commented Apr 6, 2022

Hi Team,

I am not able to install this library when my react version 16+.

npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^18.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.4" from @mrblenny/[email protected]
@donaldking
Copy link

Hi Team,

Are there any plan to provide support for react versions > 16?

@ruze00
Copy link

ruze00 commented Jun 24, 2023

This repo has been unmaintained since 2020, so I would guess no. Maybe someone can fork it and take over as the official repo?

@Derick1530
Copy link

This repo has been unmaintained since 2020, so I would guess no. Maybe someone can fork it and take over as the official repo?

Make sense

@Derick1530
Copy link

seems like this is no longer maintained any libray out there you can suggest?

@wimpog
Copy link

wimpog commented Jul 18, 2024

Any replacement, please? Need it to work with React 16+

@mesutissimo
Copy link

mesutissimo commented Jul 21, 2024

Have you tried building it yourself ? With putting the lines below in package.json of the library. I am using it like this.

 "peerDependencies": {
    "react": "^16.8.4",
    "react-dom": "^16.8.4"
  },

@wimpog
Copy link

wimpog commented Jul 21, 2024

@mesutissimo doesn't it still restrict it to React 16?

@mesutissimo
Copy link

mesutissimo commented Jul 21, 2024

@wimpog That is my package.json for the local react-flow-chart library

{
  "name": "@mrblenny/react-flow-chart",
  "version": "0.0.11",
  "description": "A flexible, stateless flow chart library for react.",
  "main": "src/index.js",
  "repository": "[email protected]:MrBlenny/react-flow-chart.git",
  "author": "David Revay <[email protected]>",
  "license": "MIT",
  "devDependencies": {
    "@babel/core": "^7.1.2",
    "@storybook/addon-centered": "^5.3.2",
    "@storybook/addon-options": "5.3.2",
    "@storybook/addon-viewport": "5.3.2",
    "@storybook/react": "5.3.2",
    "@types/lodash": "^4.14.196",
    "@types/node": "10.12.0",
    "@types/pathfinding": "0.0.4",
    "@types/react": "^18.2.7",
    "@types/react-dom": "^18.2.7",
    "@types/styled-components": "^4.1.19",
    "@types/uuid": "^3.4.4",
    "@types/webpack": "4.4.17",
    "babel-loader": "^8.0.4",
    "lodash": "^4.17.21",
    "np": "^3.0.4",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-json-view": "^1.19.1",
    "ts-loader": "^5.2.2",
    "ts-node": "^7.0.1",
    "tslint": "^5.11.0",
    "tslint-config-standard": "^8.0.1",
    "tslint-react": "^3.6.0",
    "typescript": "^5.1.6",
    "webpack": "^4.21.0",
    "webpack-cli": "^3.1.2"
  },
  "dependencies": {
    "pathfinding": "^0.4.18",
    "react-draggable": "^4.4.5",
    "react-resize-observer": "^1.1.1",
    "styled-components": "^5.0.0",
    "uuid": "^3.3.2"
  },
  "peerDependencies": {
    "react": "^16.8.4",
    "react-dom": "^16.8.4"
  },
  "scripts": {
    "start:storybook": "start-storybook -p 6006 -c config/storybook",
    "build:storybook": "build-storybook -c config/storybook -o docs",
    "build": "tsc && cp package.json dist/ && cp -r ./dist/* ../src/custom-libraries/react-flow-chart && rm -rf dist/",
    "test": "npm run lint",
    "lint": "tslint -p tsconfig.json -c tslint.json"
  }
}

This makes the unsupported libraries within this library to use v16 and overall you can use it in your v18 project. For more detail https://nodejs.org/en/blog/npm/peer-dependencies can help to explain better than me.

@mesutissimo
Copy link

Of course at last, the library is not supporting but it is a workaround obviously

@wimpog
Copy link

wimpog commented Jul 21, 2024

Thanks, @mesutissimo. Will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants