Search code examples
next.jsvercel

Unable to deploy NextJS t3-stack: Vercel build fails with "Error: The file "/vercel/path0/dist/routes-manifest.json" couldn't be found


[04:52:20.975] info  - Collecting page data...
[04:52:25.837] info  - Generating static pages (0/6)
[04:52:25.923] info  - Generating static pages (1/6)
[04:52:25.938] info  - Generating static pages (2/6)
[04:52:25.950] info  - Generating static pages (4/6)
[04:52:25.970] info  - Generating static pages (6/6)
[04:52:25.982] info  - Finalizing page optimization...
[04:52:25.985] 
[04:52:26.004] Route (pages)                              Size     First Load JS
[04:52:26.006] ┌ ○ /                                      3.28 kB         110 kB
[04:52:26.006] ├   /_app                                  0 B             107 kB
[04:52:26.006] ├ ○ /404                                   181 B           107 kB
[04:52:26.006] ├ λ /api/auth/[...nextauth]                0 B             107 kB
[04:52:26.006] ├ λ /api/examples                          0 B             107 kB
[04:52:26.007] ├ λ /api/restricted                        0 B             107 kB
[04:52:26.007] └ λ /api/trpc/[trpc]                       0 B             107 kB
[04:52:26.007] + First Load JS shared by all              109 kB
[04:52:26.007]   ├ chunks/framework-3b5a00d5d7e8d93b.js   45.4 kB
[04:52:26.007]   ├ chunks/main-94d897311acc2837.js        27.1 kB
[04:52:26.007]   ├ chunks/pages/_app-4e49c70b8a55ab64.js  33.2 kB
[04:52:26.007]   ├ chunks/webpack-ee7e63bc15b31913.js     815 B
[04:52:26.007]   └ css/14a4ce6fb40c3e06.css               2.16 kB
[04:52:26.007] 
[04:52:26.008] λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
[04:52:26.008] ○  (Static)  automatically rendered as static HTML (uses no initial props)
[04:52:26.008] 
[04:52:26.389] Error: The file "/vercel/path0/dist/routes-manifest.json" couldn't be found. This is normally caused by a misconfiguration in your project.
[04:52:26.389] Please check the following, and reach out to support if you cannot resolve the problem:
[04:52:26.390]   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.
[04:52:26.390] Learn More: https://err.sh/vercel/vercel/now-next-routes-manifest

Seeing this error while deploying t3-stack on the Vercel platform.

Tried redeploying the app multiple times and also deleted and recreated the Vercel project.


Solution

  • Removing vercel.json file that was created as part of the template by the create-t3-app and recreating the project on vercel resolved the issue.

    References

    https://github.com/t3-oss/create-t3-app/issues/912