Angular 17 + Bootstrap 5.3.2 (popper.js not working) trying to migrate to @floating-ui (rebranded popper.js)

292 views Asked by At

I'm using Angular 17 to build a web app and I'm trying to use Bootstrap as I've always done. Every time I've used Bootstrap I've included it with CDN links and now I'm trying to include it via npm and I've installed it with npm install bootstrap as the offical website suggest and I've seen everywhere that Bootstrap is based on third party library like popper.js and so on.

The main problem is that some of the Bootstrap functionalities like dropdowns, accordions and more are broken with popper.js that seems to be deprecated now.

So I'm including Bootstrap via npm and also including it inside my angular.json like this:

enter image description here

Inside the list of scripts, from the first to the fourth basically I'm trying to specify the path to the new rebranded popper.js library (called @floating-ui) and this fix my problems on the web app (dropdowns and accordions stopped working) but I receive an error on the console:

enter image description here

I don't know how to fix it and I've tried to rearrange the imports but didn't worked. That's the structure of the library installed:

enter image description here

I've installed @floating-ui via npm with npm install @floating-ui/dom.

If anyone can help me I would be grateful, Thank you!

0

There are 0 answers