-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Case Study] Vercel+nextjs PnP compatibility #2031
Comments
Just to echo this here as well
Depends, how does it get here? Is it something they invoke on their servers or is it run by the user? We have a Discord server if you want to discuss this there |
I believe that What I see on my end is these logs – that’s not very helpful for this investigation probably. As a user of Next.js and Vercel, I don’t have more insight unfortunately. Perhaps, @timneutkens or @Timer could link you to the right people? (sorry for spam-tagging folks 🙏) |
I wonder is what is |
Closing this as there is a solution now (setting |
I'd argue that their solution isn't adding PnP support, it's forcibly disabling it :( |
@merceyz oh I see: vercel/vercel#5552 😔 Reopening |
What package is covered by this investigations?
Describe the goal of the investigation
Help Vercel users deploy their Next.js apps via GitHub (the same way it works for Yarn v1)
Investigation report
At the moment, it seems to be impossible to deploy a Next.js app using Yarn v2 into Vercel. You can find an example project in kachkaev/njt#29. The problem is being discussed in vercel/vercel#4910. Official issue: vercel/vercel#5280.
Most likely the blocker is in these lines: https://github.com/vercel/vercel/blob/c7e2280d231443917ecab2fffefdf0aea2a5bb78/packages/now-next/src/index.ts#L144-L154.
This takes us to a pretty popular
resolve-from
package and this issue in particular: sindresorhus/resolve-from#16. Maaaaybe the source of incompatibility is somewhere around here: https://github.com/sindresorhus/resolve-from/blob/188ed7da119c788d98272852e8a71fd19195f6cf/index.js#L29-L33.I guess the reason for using
resolveFrom
in@vercel/next
is the desire to support monorepos. A Next.js app is usually installed in the root of the repo (like in the example project I shared earlier), but it can also reside inpackages/my-app-1
andpackages/my-app-2
, for instance. In practice, such apps may refer to different versions ofnext
in theirpackage.json
files.Given the popularity of all the three parts of the broken equation, it’d be great to get some help from the Yarn 2 community. Perhaps, the fix is not that complicated for those who understand the workings of PnP? Happy to help with testing! 🙌
The text was updated successfully, but these errors were encountered: