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

Error using bootstrap 5

Open wagnerfillio opened this issue 3 years ago • 10 comments

I always get error when using with bootstrap 5

Uncaught TypeError: _events2.default is not a constructor at BootstrapTableContainer.RemoteResolver (remote-resolver.js:132) at new BootstrapTableContainer (index.js:72) at constructClassInstance (react-dom.development.js:12716) at updateClassComponent (react-dom.development.js:17425) at beginWork (react-dom.development.js:19073) at HTMLUnknownElement.callCallback2 (react-dom.development.js:3945) at Object.invokeGuardedCallbackDev (react-dom.development.js:3994) at invokeGuardedCallback (react-dom.development.js:4056) at beginWork$1 (react-dom.development.js:23964) at performUnitOfWork (react-dom.development.js:22776)

wagnerfillio avatar Jan 12 '22 01:01 wagnerfillio

Same issue here, have you found a solution? @wagnerfillio "react-bootstrap-table-next": "^4.0.3", "react-bootstrap-table2-editor": "^1.4.0", "react-bootstrap-table2-filter": "^1.3.3", "react-bootstrap-table2-overlay": "^2.0.0", "react-bootstrap-table2-paginator": "^2.1.2", "react-bootstrap-table2-toolkit": "^2.1.3",

Yov00 avatar Jan 27 '23 09:01 Yov00

Hi there,

I faced the same issue but couldn't find any solution on the internet. However, I managed to fix the issue by installing the 'react-scripts' library. It worked perfectly for me.

I am not sure about its compatibility with other versions, but the specified version 1.1.4 worked for me. To install it, simply run: npm install [email protected]

I am sharing my solution here to assist anyone else who may be struggling with the same issue. Hopefully, this helps someone out there.

Cheers!

shmohit2002 avatar Feb 20 '23 13:02 shmohit2002

I faced the same issue but couldn't find any solution on the internet. However, I managed to fix the issue by installing the 'react-scripts' library. It worked perfectly for me.

I'm using Vite though.

aprilmintacpineda avatar Feb 21 '23 10:02 aprilmintacpineda

Found this related error that was opened a while back https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/1624

aprilmintacpineda avatar Feb 21 '23 10:02 aprilmintacpineda

I faced the same issue but couldn't find any solution on the internet. However, I managed to fix the issue by installing the 'react-scripts' library. It worked perfectly for me.

I'm using Vite though.

Was using the same though😂

shmohit2002 avatar Feb 21 '23 14:02 shmohit2002

I faced the same issue but couldn't find any solution on the internet. However, I managed to fix the issue by installing the 'react-scripts' library. It worked perfectly for me.

I'm using Vite though.

Was using the same though😂

wait, what hahahahaha😅😅

aprilmintacpineda avatar Feb 21 '23 14:02 aprilmintacpineda

I faced the same issue but couldn't find any solution on the internet. However, I managed to fix the issue by installing the 'react-scripts' library. It worked perfectly for me.

I'm using Vite though.

Was using the same thoughjoy

wait, what hahahahahasweat_smilesweat_smile

This seems to be the cursed side of bootstrap with the name react bootstrap table😂. From my observation this happens because by default create react app and most tools offer react-scripts out of the box while vite doesn't.

shmohit2002 avatar Feb 21 '23 14:02 shmohit2002

I also ran into this when switching from CRA to vite.

Just installing the "events" worked for me. Somehow ChatGPT figured this out but a Google search did not!

jtsay362 avatar Mar 25 '23 06:03 jtsay362

Same error whe migrating to vite. Did you find out anything?

Javier1995 avatar Apr 18 '23 03:04 Javier1995

Installing "events" will make it work for local development, once you create a production build, it will no longer work. https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/1624#issuecomment-1441145011

aprilmintacpineda avatar Apr 18 '23 03:04 aprilmintacpineda