When running a create-react-app app with react-bootstrap installed, I am getting this error below when trying to add a Button

My imports are like this:
import 'bootstrap/dist/css/bootstrap.min.css';
import './App.css';
import PropTypes from "prop-types";
import { Button } from "bootstrap";
import { PureComponent } from "react";
and the render code:
render() {
return (
<div className="App">
<header />
<Button>Test</Button>
...
I have looked into lots of other questions talking about Babel, Webpack, and a compiler config. But I am not seeing all these configurations inside my create-react-app.
So, I found the problem. After 1 hour lost. The mistake was on the suggested import that I've added.
Wrong:
import { Button } from "bootstrap";
Right:
import { Button } from "react-bootstrap";
In my case the error was due the way I export my class.
At the end of my class file I added export default ClassName() instead of just export default ClassName without parenthesis.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With