apalfrey / select2-bootstrap-5-theme

A Select2 v4 theme for Bootstrap 5
https://apalfrey.github.io/select2-bootstrap-5-theme/
MIT License
212 stars 48 forks source link

select2-bootstrap-5-theme@npm:1.2.0 doesn't provide @popperjs/core (p36ae4), requested by bootstrap #67

Closed thorewi closed 2 years ago

thorewi commented 2 years ago

Hello,

when I install this package using yarn v3.2.0, I'm getting the error:

➤ YN0002: │ select2-bootstrap-5-theme@npm:1.2.0 doesn't provide @popperjs/core (p36ae4), requested by bootstrap

which is referenced here:

https://yarnpkg.com/advanced/error-codes#yn0002---missing_peer_dependency

Can you please fix it? Thank you.

apalfrey commented 2 years ago

This is just saying it's missing a peer dependency, it's just a warning. As @popperjs/core is only used in Bootstrap's JS and this theme is only using the Bootstrap SCSS for styling, it's not necessary for the theme to install @popperjs/core for something it isn't even using.

If you need to use the Bootstrap JS files, you should be installing bootstrap and @popperjs/core in your own project.

Hope this helps

thorewi commented 2 years ago

Both @popperjs/core and bootstrap is installed in my project:

    "@popperjs/core": "^2.11.5",
    "bootstrap": "^5.1.3",

I had to add

packageExtensions:
  select2-bootstrap-5-theme@*:
    peerDependencies:
      "@popperjs/core": "*"
  adt-js-components@*:
    peerDependencies:
      "@popperjs/core": "*"

to .yarnrc.yml to fix the issue. So I'm still thinking the problem is not on my side.