Skip to content
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

Unmet peer dependency warning for @popperjs/core which is requested by bootstrap when using Yarn #172

Open
2 tasks done
jmalvinez opened this issue Feb 23, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jmalvinez
Copy link

jmalvinez commented Feb 23, 2024

Prerequisites

Describe the issue

Hi team, we're using Yarn as our package manager and noticed the warning below when installing our dependencies which includes @govtechsg/sgds-web-component.

➤ YN0002: │ @govtechsg/sgds-web-component@npm:1.0.2 doesn't provide @popperjs/core (p4cfd4), requested by bootstrap
➤ YN0002: │ @govtechsg/sgds@npm:2.2.0 doesn't provide @popperjs/core (p62b33), requested by bootstrap
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code

This happens because one of your dependencies - bootstrap: ^5.1.3 lists @popperjs/core: ^2.11.8 as its peer dependency. Yarn doesn't automatically install peer dependencies unlike NPM >= v7.

We still get the said warning even if we add @popperjs/core to our dependencies since peer dependencies in Yarn need to be satisfied by the immediate dependant (@govtechsg/sgds-web-component), and not just somewhere (multiple steps) up the dependency chain.

Perhaps you could consider adding @popperjs/core to your peerDependencies based on this discussion about inherting peer dependencies from your dependencies. Otherwise, you could also just add it as a direct dependency. Thanks!

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Chrome

Describe your frontend stack. What version of React and @govtechsg/sgds-web-component are you using? CSR or SSR?

yarn v2.4.3, React v18.2.0, @govtechsg/sgds-web-component v1.0.2

@jmalvinez jmalvinez added the bug Something isn't working label Feb 23, 2024
@jmalvinez jmalvinez changed the title @popperjs/core is missing from dependencies of @govtechsg/sgds-web-component Unmet peer dependency warning for @popperjs/core which is requested by bootstrap when using Yarn Feb 23, 2024
@clukhei
Copy link
Collaborator

clukhei commented Feb 28, 2024

Hi @jmalvinez, thanks for highlighting issue. Sure , we can make the change, in our next minor version.

We also welcome contributions if you are keen, let us know 😉

@clukhei clukhei self-assigned this Feb 28, 2024
@clukhei
Copy link
Collaborator

clukhei commented Mar 1, 2024

seems like this issue came from the @govtechsg/sgds dependency. I'll probably need to resolve it there first when im back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants