Peer dependency chain break when using yarn PnP
See original GitHub issueDescribe/explain the bug When using nivo with yarn PnP, it detects a peer dependency error in multiple nivo packages.
Module not found: Error: @react-spring/web tried to access react-dom (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
Required package: react-dom
Required by: @react-spring/web@virtual:e8c6662d9f78e41ff789a28882111350ff5b64c3c794140fe7d01b34d06873f67095ca85dab6b6c9721116a1d2f2c5c8c4eb217f2440fbde8a3b5f9ef602ee80#npm:9.3.1 (via /drone/src/.yarn/__virtual__/@react-spring-web-virtual-3d46070674/0/cache/@react-spring-web-npm-9.3.1-60971e196c-223ce3f849.zip/node_modules/@react-spring/web/dist/)
Ancestor breaking the chain: @nivo/annotations@virtual:35d44cfec8561a797578e823be1fd096acd3df9fc3a4e4b4c80f073c7526baf09ab7c08aeabd68e0c5bb844a46dd175777dcf65c56ed77892b901003e8958493#npm:0.79.1
Ancestor breaking the chain: @nivo/arcs@virtual:5193e94f9222e16f5b856787ff397f36674e24498feb1122bfefc7f678d0294512c05edbb989dd133701c225c88477fbe74421f02e0a28522619076847d07ede#npm:0.79.1
Ancestor breaking the chain: @nivo/axes@virtual:35d44cfec8561a797578e823be1fd096acd3df9fc3a4e4b4c80f073c7526baf09ab7c08aeabd68e0c5bb844a46dd175777dcf65c56ed77892b901003e8958493#npm:0.79.0
Ancestor breaking the chain: @nivo/core@virtual:39a864ede30edfae2e2ba7d0802407e9c2507af99f488a2b4ab24b831e07f4dfc8d9b9c2bc8344d0e497fe2781e197d33ae2bf11687188b4b418654d3b798461#npm:0.79.0
Ancestor breaking the chain: @nivo/line@virtual:39a864ede30edfae2e2ba7d0802407e9c2507af99f488a2b4ab24b831e07f4dfc8d9b9c2bc8344d0e497fe2781e197d33ae2bf11687188b4b418654d3b798461#npm:0.79.1
Full log output can be found here: https://drone.mauz.io/MauriceNino/dashdot/148/1/3
To Reproduce
Check out https://github.com/MauriceNino/dashdot, switch to branch feature/yarn_pnp
and run yarn && yarn build
.
Additional context react-spring has a peer dependency to react-dom, so you should forward it, or install it.
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
PnP Specification | Yarn - Package Manager
In order to properly represent packages listing peer dependencies, Yarn relies on a concept called Virtual Packages. Their most notable property is that ......
Read more >Yarn errors when running slicemachine - Prismic People
Error: io-ts-types tried to access newtype-ts (a peer dependency) but it ... Ancestor breaking the chain: @slicemachine/core@npm:1.1.12.
Read more >pnpm: Fast, disk space efficient package manager for JavaScript
I can't even fix it by using the webpack plugin because pnpm breaks webpack. Also worth noting that 90% of the "problems" that...
Read more >@yarnpkg/doctor - npm
By making sure all dependencies are listed in the package.json pnp can make your project less brittle. no unmet peer dependencies. This rule ......
Read more >Strict dependency management - HackMD
PlugAndPlay (PnP). This is a protocol introduced by yarn which modifies the nodejs runtime to communicate the real dependency graph independentely of how ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
bump
I have switched to recharts which has way better performance, …but then I ditched PnP afterwards anyways. It’s just not ready to be used in semi-big projects.