binodswain/react-faq-component

unable to install using 18.2.0

AdamPhasey opened this issue · 4 comments

npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! react@"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.0 || ^16.0.0 || ^17.0.0" from react-faq-component@1.3.3
npm ERR! node_modules/react-faq-component
npm ERR! react-faq-component@"*" 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.

Had this same error about an hour ago, have you found a solution yet?

hey Josh, no solution as of now.

Alright, I found a way around it.
I decided to drop my react version from 18 to 17.
From the error log it appears the package has not been optimised for react 18 yet.

I dropped to v17 and it works like a charm.
Follow this https://exerror.com/how-to-downgrade-react-version-18-to-17/
Use the method 2.

You'll have to also edit your root index.js file at src/index.j
I'll suggest you just copy and replace the index.js from an old v17 project.

Whole process should take less than 15 minutes. Cheers

published react-faq-component@1.3.4 for react 18.