react-bootstrap-table2 icon indicating copy to clipboard operation
react-bootstrap-table2 copied to clipboard

Support for react version 17.0.1

Open Susan123456789 opened this issue 4 years ago • 9 comments

Describe the bug Unable to install react-bootstrap-table-next on the latest create-react-app which uses react 17.0.1:

To Reproduce Steps to reproduce the behavior:

  1. npx create-react-app example
  2. cd example
  3. npm install react-bootstrap-table-next --save
  4. See error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
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@"*" 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.

Susan123456789 avatar Nov 05 '20 14:11 Susan123456789

Hello, has anyone found solution for this? I mean, is it safe to install with --legacy-peer-deps?

MLazarevic36 avatar Apr 01 '21 11:04 MLazarevic36

Hello, has anyone found solution for this? I mean, is it safe to install with --legacy-peer-deps?

I have just tried it and it seems to give me some security issues but seems to install.

$ npm install react-bootstrap-table-next --save --force npm WARN using --force Recommended protections disabled. npm WARN ERESOLVE overriding peer dependency npm WARN Found: [email protected] npm WARN node_modules/react npm WARN peer react@">=0.14.0" from @hypnosphi/[email protected] npm WARN node_modules/@hypnosphi/create-react-context npm WARN @hypnosphi/create-react-context@"^0.3.1" from [email protected] npm WARN node_modules/react-popper npm WARN 7 more (@testing-library/react, react-dom, react-popper, ...) npm WARN npm WARN Could not resolve dependency: npm WARN peer react@"^16.3.0" from [email protected] npm WARN node_modules/react-bootstrap-table-next npm WARN react-bootstrap-table-next@"" from the root project npm WARN ERESOLVE overriding peer dependency npm WARN Found: [email protected] npm WARN node_modules/react-dom npm WARN peer react-dom@"" from @testing-library/[email protected] npm WARN node_modules/@testing-library/react npm WARN @testing-library/react@"^11.2.6" from the root project npm WARN 3 more (react-transition-group, reactstrap, the root project) npm WARN npm WARN Could not resolve dependency: npm WARN peer react-dom@"^16.3.0" from [email protected] npm WARN node_modules/react-bootstrap-table-next npm WARN react-bootstrap-table-next@"*" from the root project

I then audited the install and got a high level warning from the install of underscores with the table-next

underscore 1.3.2 - 1.12.0 Severity: high Arbitrary Code Execution - https://npmjs.com/advisories/1674 fix available via npm audit fix --force Will install [email protected], which is a breaking change node_modules/underscore react-bootstrap-table-next >=1.1.1 Depends on vulnerable versions of underscore node_modules/react-bootstrap-table-next

Which just suggests to downgrade to 1.1.0. I don't think there is any breaking changes to the table-next library with react 17.0.2 from 16.3.0 but will explore any issues I find and post here. I think the package.json just needs to be updated for the library.

risingsunomi avatar Jun 03 '21 20:06 risingsunomi

It works for me (you can take a look at my package.json. However it does throw a lot of missing peer dependencies warnings:

npm WARN @babel/[email protected] requires a peer of @babel/core@^7.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself.

Avasam avatar Jun 23 '21 20:06 Avasam

It works for me (you can take a look at my package.json. However it does throw a lot of missing peer dependencies warnings:

npm WARN @babel/[email protected] requires a peer of @babel/core@^7.13.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^16.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^16.3.0 but none is installed. You must install peer dependencies yourself.

Yes, seen the same but the package is working after forcing the install. Doesn't seem to break with new react. If, in the future, this project won't be updated to new react, the community might need to fork it and keep it up to date

risingsunomi avatar Jun 26 '21 12:06 risingsunomi

@AllenFang can you please update the react version?

pavanshinde81 avatar Feb 04 '22 11:02 pavanshinde81

Like @risingsunomi I also forced the install with npm install react-bootstrap-table-next --legacy-peer-deps and the component seems to be working fine for me as well, so I think once @camarneiro's pull request gets merged in a normal install will work.

thebrandonlucas avatar Mar 03 '22 18:03 thebrandonlucas

any news about the update of react version?

mmelilli avatar Mar 24 '22 14:03 mmelilli

Like @risingsunomi I also forced the install with npm install react-bootstrap-table-next --legacy-peer-deps and the component seems to be working fine for me as well, so I think once @camarneiro's pull request gets merged in a normal install will work.

Work for me, but I think, it’s good to fix that in a better way :)

201flaviosilva avatar Jun 02 '22 14:06 201flaviosilva

Looks like musicstory fork of this package is updated to react v17. https://www.npmjs.com/~musicstory

    "@musicstory/react-bootstrap-table-next": "^1.0.5",
    "@musicstory/react-bootstrap-table2-editor": "^1.0.1",
    "@musicstory/react-bootstrap-table2-filter": "^1.0.1",

bartektartanus avatar Jul 27 '22 10:07 bartektartanus