I added Bootstrap and routing to a frontend, deleted my node_modules, and re-installed them with yarn install. When I try to npm run build
, I get:
Creating an optimized production build...
Failed to compile.
./node_modules/react-bootstrap/esm/index.js
Attempted import error: 'AccordionCollapseProps' is not exported from './AccordionCollapse'.
I'd like to fix this error. I can post more extensive code if helpful.
There is an open issue in their github repo: https://github.com/react-bootstrap/react-bootstrap/issues/5267
One reported fix is to roll back to version 1.0.1.
npm install [email protected] --save
That worked for me.
After zxvaf's solution if the problem still continues you should also remove ^ character from react-bootstrap in package.json file. So it should be like this
"react-bootstrap": "1.0.1",
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