-
Notifications
You must be signed in to change notification settings - Fork 429
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
Bootstrap 5.0.1 fail #1624
Comments
I have it too but I don't find any solution now |
Facing the same issue, is there a fix? |
Any update on this issue? |
Seems to be a library issue then? :( |
Upgrading a project and encountering the same issue:
|
If anyone is still experiencing this and is using vite to bundle, I found that the following works for me // vite.config.ts
export default defineConfig({
...
resolve: {
alias: {
events: 'rollup-plugin-node-polyfills/polyfills/events',
...
}
}
} using this module https://www.npmjs.com/package/rollup-plugin-node-polyfills |
Hi @clemens1483 , i have added the piece of code you mentioned and it started working, but when i deploy to production it still has the issue. any work around for this ? |
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: 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! |
Still a problem until today, darn bootstrap is a tech debt. |
works in development, but when you build for production, you'll get |
I'll still ask you have you tried using react-scripts solution mentioned above in the thread? |
Hi @aprilmintacpineda, update your importing method and it will fix the issue. import 'react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.min.css'; |
import 'react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.min.css';
import paginationFactory from 'react-bootstrap-table2-paginator';
import BootstrapTable from 'react-bootstrap-table-next'; We already use these imports. |
@aprilmintacpineda , Check for toolkitprovider etc as well. basically the issue is due to importing , in their docs they haven't updated it so that's why we are facing it. |
So, I ran
There was one entry coming from axios that was really long
so I tried, |
Thanks for your solution! After I installed “npm i events” it works now. In development and production mode "vite Preview --port 3000" |
Thank you very much! This solution also resolved crash of
|
I'm trying to use react-bootstrap-table-next on a site with this theme https://demo.themesberg.com/volt-react-dashboard/
I never had problems with Bootstrap 4, but this theme uses Bootstrap 5.0.1 and gives me this error:
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)
Anyone else had this problem?
The text was updated successfully, but these errors were encountered: