Error on Vercel Nextjs deploy
See original GitHub issueCurrent Behavior
Deploy Nextjs monorepo gets an error
Steps to Reproduce
- Create nx workspace with Nextjs preset.
- Go to Vercel account.
- Import repository.
- Modify default commands on Vercel:
Build command: nx build <app>
Directory: dist/apps/<app>
Failure Logs
Error: A "routes-manifest.json" couldn't be found. This is normally caused by a misconfiguration in your project.
Please check the following, and reach out to support if you cannot resolve the problem:
1. If present, be sure your `build` script in "package.json" calls `next build`. 2. Navigate to your project's settings in the Vercel dashboard, and verify that the "Build Command" is not overridden, or that it calls `next build`. 3. Navigate to your project's settings in the Vercel dashboard, and verify that the "Output Directory" is not overridden. Note that `next export` does **not** require you change this setting, even if you customize the `next export` output directory. Learn More: https://err.sh/vercel/vercel/now-next-routes-manifest
Environment
@nrwl/cli: 10.3.2 @nrwl/next: 10.3.2 next: 10.0.1 typescript: 4.0.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:29 (3 by maintainers)
Top Results From Across the Web
Deploying NextJS to Vercel failed - Stack Overflow
I am trying to deploy an app to Vercel, and getting this error at build. 14:13:58.168 Cloning github.com/ChrisB007/moodflics (Branch: main, ...
Read more >Errors – Vercel Docs
If the Project configuration in .vercel belongs to a Team you are not a member of, attempting to deploy the Project will result...
Read more >Internal Server Error after deploying to Vercel. #34576 - GitHub
I have an app that works fine on my local, but it is not working after the deployment on Vercel. This is the...
Read more >NEED HELP: Next js deployment failed with error - why?
I just tried to deploy a Next js application on Vercel, but I got an error and I am not sure what went...
Read more >Deployment - Next.js
Learn how to deploy your Next.js app to production, either managed or ... Vercel is the fastest way to deploy your Next.js application...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can’t? An alternative to modify
workspace.json
is create a build command onpackage.json
:"build:app": "nx build app --outputPath .
and override build command on Vercel. This works for me. Leo Lamprecht, dev on Vercel, says that they are working with optimizarions for NX workspaces. But, for now, he says that this is the solution.Vercel Support Twitter send me this: https://twitter.com/vercel_support/status/1325770048934465537?s=20