3

I have a existing react 17 application, which needs to migrate react 18. So when migrating I faced compatible issue with react-bootstrap-table-next. "While resolving: [email protected] Found: [email protected]" I dont have any option to change react-bootstrap-table-next to another table package due to this is a existing project and dont have time to re implement table feature. Appreciate any guidance or support!

I have to upgrade React 17 to 18 and when run npm install got above error. "While resolving: [email protected] Found: [email protected]"

here full error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!   peer react@">=16.8.0" from @emotion/[email protected]
npm ERR!   node_modules/@emotion/react
npm ERR!     @emotion/react@"^11.1.1" from [email protected]
npm ERR!     node_modules/react-select
npm ERR!       react-select@"^5.2.1" from the root project
npm ERR!   31 more (@fortawesome/react-fontawesome, @react-aria/ssr, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.3.0" from [email protected]
npm ERR! node_modules/react-bootstrap-table-next
npm ERR!   react-bootstrap-table-next@"^4.0.3" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"^16.3.0" from [email protected]
npm ERR!   node_modules/react-bootstrap-table-next
npm ERR!     react-bootstrap-table-next@"^4.0.3" 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.
7
  • Show the full warning message. Commented Jul 26, 2023 at 2:25
  • @LinDu updated error on above summary Commented Jul 26, 2023 at 4:23
  • I think you have asked a broader level question here: Need a help to migrate react 17 to 18 Commented Jul 26, 2023 at 5:04
  • 2
    Just checked their Github issues and there are a lot of open issues for adding support for React 18. I think the library is unmaintained, unfortunately. Commented Jul 26, 2023 at 5:27
  • 1
    Thanks @vighnesh153, I have already raised a issue, but seems most of them are suggesting to use a alternative table for that one, but with the limited time I cant move to another table library. Commented Jul 26, 2023 at 5:31

1 Answer 1

2

I've made an updated version that works with React 18. I added type files as well to allow use with TypeScript.

https://www.npmjs.com/package/fad-react-bootstrap-table-next

Sign up to request clarification or add additional context in comments.

1 Comment

why not change it in the original repo? also Is there plans for the other packages of the bootstrap table2 like paginator or toolkit?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.