mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 04:22:01 +00:00
[now-next] Provide a better error when failing to load routes-manifest (#4161)
This updates the error message shown when we fail to load the `routes-manifest` which appears to be happening most often when an incorrect output directory is configured for a Next.js application
This commit is contained in:
11
errors/now-next-routes-manifest.md
Normal file
11
errors/now-next-routes-manifest.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Routes Manifest Could Not Be Found
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
This could be caused by a failure during the build or an incorrect output directory being configured for your Next.js project.
|
||||
|
||||
#### Possible Ways to Fix It
|
||||
|
||||
Check for any build errors in the logs and ensure that the output directory setting is either not changed or is pointing to the location of the `.next` output folder (`distDir`).
|
||||
|
||||
If you are running `next export` you should **not** need to customize the output directory to `out` since the builder automatically detects `next export` being run and uses the output from it.
|
||||
@@ -340,7 +340,7 @@ export async function getRoutesManifest(
|
||||
|
||||
if (shouldHaveManifest && !hasRoutesManifest) {
|
||||
throw new Error(
|
||||
`A routes-manifest.json couldn't be found. This could be due to a failure during the build`
|
||||
`A "routes-manifest.json" couldn't be found. Is the correct output directory configured? This setting does not need to be changed in most cases. More info: https://err.sh/zeit/now/now-next-routes-manifest`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user