question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on Vercel Nextjs deploy

See original GitHub issue

Current Behavior

Deploy Nextjs monorepo gets an error

Steps to Reproduce

  1. Create nx workspace with Nextjs preset.
  2. Go to Vercel account.
  3. Import repository.
  4. 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:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:29 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
caenguidanoscommented, Nov 16, 2020

You can’t? An alternative to modify workspace.json is create a build command on package.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.

2reactions
caenguidanoscommented, Nov 9, 2020

Vercel Support Twitter send me this: https://twitter.com/vercel_support/status/1325770048934465537?s=20

Hello Cristian,

We don't support NX-powered apps at the moment. Our team is working on making this feature available for you shortly, and we should get back to you once we support NX.
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found