next-runtime icon indicating copy to clipboard operation
next-runtime copied to clipboard

Site Deploy Fails Using Yarn 2 PnP

Open cravend opened this issue 3 years ago • 4 comments

Describe the bug I recently activated Yarn PnP on my site. However, this is causing the validateNextUsage to fail. Switching back to the traditional node_modules fixes the issue.

To Reproduce

  • Create a site using Yarn 2 PnP
  • Install Next and deploy to Netlify

Expected behavior Site deploys properly.

Versions

  • Next.js: 10.0.9
  • plugin (if installed at fixed version): 3.0.3

cravend avatar Mar 21 '21 16:03 cravend

Any updates on this?

denanceapp avatar May 25 '21 05:05 denanceapp

I had the same issue. I "fixed" it too by setting nodeLinker to "node-modules" in yarnrc.yml. But then no pnp support.

Aaron-Storm avatar May 28 '21 17:05 Aaron-Storm

Just adding "berry" as a keyword here. Should be addressed asap.

levino avatar Jul 13 '21 10:07 levino

I've been doing some research on this but haven't had much luck on finding a solution. I did find this issue on Yarn 2's repo that seems to be what we're running into here: https://github.com/yarnpkg/berry/issues/1467

Is there a way for me to locally test this sort of thing? It's a pretty specific issue and I'm not really sure how to get started with it, and I don't see any tests that relate to validateNextUsage.

cravend avatar Jul 23 '21 14:07 cravend

Is Yarn v2 or v3 used here?

electrolyte-orb avatar Oct 27 '22 04:10 electrolyte-orb

This is something we may address in the future, but for now see https://docs.netlify.com/configure-builds/manage-dependencies/#yarn where it shows you how to configure yarn to set a yarnpath in conjunction with nodelinker.

cc: @kitop

nickytonline avatar Apr 24 '23 16:04 nickytonline