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

React 17 dependency issue with react-popper #2045

Closed
jcebuck opened this issue Dec 22, 2020 · 13 comments
Closed

React 17 dependency issue with react-popper #2045

jcebuck opened this issue Dec 22, 2020 · 13 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@jcebuck
Copy link

jcebuck commented Dec 22, 2020

Following the instructions on the README to install the latest version using npx create-react-app.
Reaching this line there's a dependency issue npm i reactstrap react react-dom:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   peer react@"*" from @testing-library/react@11.2.2
npm ERR!   node_modules/@testing-library/react
npm ERR!     @testing-library/react@"^11.2.2" from the root project
npm ERR!   peer react@"17.0.1" from react-dom@17.0.1
npm ERR!   node_modules/react-dom
npm ERR!     peer react-dom@"*" from @testing-library/react@11.2.2
npm ERR!     node_modules/@testing-library/react
npm ERR!       @testing-library/react@"^11.2.2" from the root project
npm ERR!     react-dom@"^17.0.1" from the root project
npm ERR!     1 more (reactstrap)
npm ERR!   2 more (the root project, reactstrap)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"0.14.x || ^15.0.0 || ^16.0.0" from react-popper@1.3.7
npm ERR! node_modules/reactstrap/node_modules/react-popper
npm ERR!   react-popper@"^1.3.6" from reactstrap@8.7.1
npm ERR!   node_modules/reactstrap
npm ERR!     reactstrap@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Can we just bump the version of react-popper to a version that supports React 17?

@kyletsang
Copy link
Member

Unfortunately we won't be migrating to react-popper v2 anytime soon. We're currently on the latest version of 1.x and I think that's been deprecated for some time.

@kyletsang kyletsang added the dependencies Pull requests that update a dependency file label Jan 11, 2021
@gauravshah27
Copy link

I am facing this issue as well on reactstrap@8.9.0. Is there any plan to update the version of react-popper to a version that is compatible with React 17? I was looking through all the branches and even the bootstrap 5 branch does not seem to bump up the version.

I was also looking at the various comments in this thread - #1748 and its unclear whether reactstrap is going to support bootstrap 5 or is react-bootstrap the path forward?

@bestguy
Copy link
Contributor

bestguy commented Feb 4, 2021

Hi @gauravshah27, we have a Bootstrap v5 PR pending from a fork that includes Popper v2 update.
Perhaps some of this Popper update can be backported to v4? https://github.com/gthomas-appfolio/reactstrap/pull/31/files

Note this above includes changes needed for Bootstrap 5 too - not everything is needed to update reactstrap v4

@gauravshah27
Copy link

Thanks @bestguy for the reply. It would be really helpful if we can have a version 4.x with this update. Right now the move to npm 7 for our React 17 based apps is not possible because of how npm 7 treats the peer dependencies. Is there any work planned to roll out a v4 with this change?

@kyletsang
Copy link
Member

I'm currently working with the Popper team to release a 1.x version with react 17 support.

Meanwhile you could use the --legacy-peer-deps flag in npm to ignore the new peer deps behavior.

@gauravshah27
Copy link

@kyletsang thanks a lot for the prompt reply. Really appreciate the work. I have tested it out already with --legacy-peer-deps and that seems to work fine. But would love to have the 1.x version that you mentioned.

@kyletsang
Copy link
Member

react-popper 1.3.8 has been published with React 17 support

@gauravshah27
Copy link

@kyletsang thanks for letting us know and for updating react-popper.

@gauravshah27
Copy link

gauravshah27 commented Feb 17, 2021

react-popper 1.3.8 has been published with React 17 support

@kyletsang I am not seeing the react 17 support in this version. The peer dependencies still look as follows:

"peerDependencies": {
   "react":"0.14.x || ^15.0.0 || ^16.0.0"
}

I am still seeing the above issue with reactstrap@8.9.0 and react@17

Also, I am unable to find the tag on github - https://github.com/popperjs/react-popper and the last cut tag is 1.3.6 eventhough I am able to download 1.3.8.

Also this page is giving me 404 - https://github.com/popperjs/react-popper/tree/v1.3.8

this one works fine - https://github.com/popperjs/react-popper/tree/v1.3.6

@kyletsang
Copy link
Member

react-popper 1.3.8 has been published with React 17 support

I am not seeing the react 17 support in this version. The peer dependencies still look as follows:

"peerDependencies": {
   "react":"0.14.x || ^15.0.0 || ^16.0.0"
}

I am still seeing the above issue with reactstrap@8.9.0 and react@17

Also, I am unable to find the tag on github - https://github.com/popperjs/react-popper and the last cut tag is 1.3.6 eventhough I am able to download 1.3.8.

Also this page is giving me 404 - https://github.com/popperjs/react-popper/tree/v1.3.8

this one works fine - https://github.com/popperjs/react-popper/tree/v1.3.6

/cc @FezVrasta

Looks like the react 17 peer deps didn't make it into the release:
https://unpkg.com/browse/react-popper@1.3.8/package.json

@kyletsang kyletsang reopened this Feb 17, 2021
@FezVrasta
Copy link

🤦‍♂️ I'll take a look tomorrow morning, sorry 😞

@FezVrasta
Copy link

1.3.9 should be good

@kyletsang
Copy link
Member

Thanks @FezVrasta!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

5 participants