diff --git a/errors/now-next-routes-manifest.md b/errors/now-next-routes-manifest.md new file mode 100644 index 000000000..bbfd9c28c --- /dev/null +++ b/errors/now-next-routes-manifest.md @@ -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. diff --git a/packages/now-next/src/utils.ts b/packages/now-next/src/utils.ts index 7b9649853..756387d35 100644 --- a/packages/now-next/src/utils.ts +++ b/packages/now-next/src/utils.ts @@ -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` ); }