Skip to content
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

vercel build breaks with latest version complaining about corepack/yarn mismatch #8866

Open
Quicksaver opened this issue Mar 7, 2025 · 1 comment

Comments

@Quicksaver
Copy link

Describe the bug

A Nextjs app, with a route rendering the NextStudio component from next-sanity/studio, fails to build in vercel. Running yarn next build works fine, but running vercel build (which will eventually run yarn next build) fails with the following message:

Detected Next.js version: 15.2.1
Running "yarn build:production"
error This project's package.json defines "packageManager": "[email protected]". However the current global version of Yarn is 1.22.22.

Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.
Error: Command "yarn build:production" exited with 1

To Reproduce

Expected behavior

Build should continue as it always has before.

Screenshots

Which versions of Sanity are you using?

sanity 3.78.1 fails
sanity 3.78.0 works

What operating system are you using?

Which versions of Node.js / npm are you running?

npm v10.9.2
node v22.14.0 (corepack enabled)
yarn 4.6.0

Additional context

Security issue?

No

@laamdev
Copy link

laamdev commented Mar 9, 2025

Same thing is happening to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants