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.

Support for resolving Yarn Plug 'n Play modules

See original GitHub issue

Do you want to request a feature or report a bug? Request a feature

What is the current behavior? Metro does not (yet) have PnP support

If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install and yarn test.

What is the expected behavior? I think it would be very handy if Metro had support for resolving Yarn PnP modules.

Not only would there be the benefits you’d get for using it in other project, I believe that if this Yarn feature request is able to be resolved, this could be a reasonable alternative to using symlinks (since they are not able to be supported for technical reasons)

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:20
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
dalinarkholincommented, May 8, 2020

@arlyon I just added an example repo with pnp and react native working. Checkout the metro.config.js here: https://github.com/dalinarkholin/react-native-pnp-enabled

Also my comment here: https://github.com/react-native-community/cli/issues/27#issuecomment-625912523

But yes, it would be good to get it back as a option as well 😃

8reactions
arcaniscommented, Nov 6, 2018

It actually already does! We just need to open-source the resolver in a separate package (or make it native, possible) 😃 ping @rafeca

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plug'n'Play | Yarn - Package Manager
An overview of Plug'n'Play, a powerful and innovative installation strategy for Node.
Read more >
get rid of node_modules with Yarn Plug'n'Play - Medium
How to get rid of node_modules with Yarn Plug'n'Play ... A special resolver is used in order to help Node discovering where each...
Read more >
Advanced package manager features for npm, Yarn, and pnpm
Alternative dependency resolution strategies. The problem with the traditional node_modules approach; Yarn Berry's Plug'n'Play approach.
Read more >
Module not found running next build using yarn Plug'n'Play
Thank you, the yarn rebuild command was key for me! In my case I was on yarn@3.2.3, I ran yarn set version latest...
Read more >
yarn - Getting started with Plug n Play - w3resource
Once you do this, Yarn will create a file named .pnp.js each time you run yarn install rather than the node_modules folder. To...
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