Hi,
That error usually means Vercel cannot find the package.json that contains next, or the project root is set incorrectly.
A few things to check:
-
In your repo, confirm
nextis listed independenciesordevDependenciesin the samepackage.jsonVercel is building from. -
In Vercel, open Project Settings → General → Root Directory and make sure it points to the folder that contains that
package.json. -
If this is a monorepo, set the root directory to the actual app folder, for example
apps/web. -
Make sure the repo includes the lockfile from the same package manager you are using.
-
Redeploy after changing the root directory or dependencies.
If next is already installed but Vercel still cannot detect it, the most likely cause is that Vercel is building from the wrong directory.