question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Peer dependency chain break when using yarn PnP

See original GitHub issue

Describe/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:closed
  • Created a year ago
  • Reactions:3
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
MauriceNinocommented, Nov 25, 2022

bump

2reactions
MauriceNinocommented, Jul 4, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found