-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
Not working with Yarn pnpm strategy #65757
Comments
I have been seeing this issue with Yarn 4.x–also using pnpm. Downgrading to Yarn 3.x is how I fixed the issue in my projects. |
@Yukigamine If you're able to use one of the other strategies it works ( |
So the issue seems to be related specifically to the |
+1, currently stuck at yarn 3 because of this, unfortunately |
Same issue. Yarn 4.3.1 with pmpm, tried wiping the files and redoing the install, but the problem persisted. |
I think something like this would work #68244 |
issue filed with yarn here: yarnpkg/berry#6269 |
Our team is also blocked by this: we currently use yarn in My basic summary of @coreyward and @vtgen's research:
next.js/packages/next/src/build/load-entrypoint.ts Lines 63 to 70 in 9d16112
It looks like the failing check was added by @wyattjoh in 03a09ba. @wyattjoh, any chance you could offer some insight on what the right path forward is here? @coreyward offers a clear repro case in the original issue above and it'd be great to get this fixed, as it's blocking turbopack migration for yarn users using In terms of "who should fix this, Next.js or yarn?" -- unless there's solid documentation otherwise, it feels to me like Next.js is trying to rely on an implementation detail that isn't actually always the case, and that it's probably Next.js's bug to fix rather than yarn's. |
This comment has been minimized.
This comment has been minimized.
I've submitted a PR to
|
@UpstartMPotnick unless I did something wrong, your yarn version does not solve the
|
@UpstartMPotnick thanks for that. @yordis -- fwiw, at first it was not working for me, but after blowing out .yarn/ and starting fresh with @UpstartMPotnick 's build, it worked for me. |
Link to the code that reproduces this issue
https://github.com/coreyward/next-yarn-pnpm-issue
To Reproduce
Run
yarn dev
in the linked repo root, then open the app at localhost:3000. This will trigger the following error:Current vs. Expected behavior
Next works fine when using the legacy
node_modules
approach for installing dependencies, and seems to have support for the Plug-N-Play strategy of pnpm, but it does not seem to account for Yarn’s hybridpnpm
strategy which is described as follows:The issue seems to come about in the load-entrypoint, which seems to make unsafe assumptions about where dependencies are located on disk relative to the project. The specific error is coming from Next.js here:
next.js/packages/next/src/build/load-entrypoint.ts
Lines 63 to 70 in 9d16112
Provide environment information
Which area(s) are affected? (Select all that apply)
Module Resolution, Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local)
Additional context
This may be related to #16471.
The text was updated successfully, but these errors were encountered: