Search code examples
iosreact-nativecocoapodsyarn-v2

Yarn v2 and Cocopods: node_modules folders doesn't exist


I have upgraded Yarn to v2. I see that there is no node_modules folder anymore. But my Podfile is still looking for it. How can I fix it?


Solution

  • node_modules are unavailable with default Yarn 2 PnP install strategy. But you can change this, add the line below to your .yarnrc.yml file to change install strategy from PnP to node_modules:

    nodeLinker: node-modules