Hello there, I would like to switch from Netlify to Vercel (because the time to first byte with Nuxt in SSR mode is way too long: about 4 seconds…) So I’ve configured my Vercel account with the right Nuxt Platform Preset (build: pnpm run build, output: dist), and set the NITRO_PRESET env as vercel.
But when i try to deploy, I have this build error (that i don’t have on localhost or netlify): Error: Builder returned invalid routes: should NOT have fewer than 1 properties
I’ve tried many things with the Vercel AI assistant (forceSSR: true in nuxt.config.ts, add / route in nitro.prerendered, changing node version etc… but still the same issue.
You shouldn’t need to set NITRO_PRESET or the output directory - you can leave that blank. Have you configured anything else, such as a custom vercel.json or configuration in your Nuxt config file?
Finally, given what you want, do you want a static generated site (nuxt generate) or an SSR/hybrid app (nuxt build)?
I don’t have a vercel.json, and there’s nothing specific to Vercel in my nuxt.config.ts.
I removed the NITRO_PRESET environment variable and tried a new deploy, but the issue persists.
I want SSR because my pages are dynamically generated from a database and cannot be static.
Everything works as excepted with Netlify, but I can’t understand why the time to first byte is so long (example: https://osso.labandotheque.fr), so I wanted to give Vercel a try.
Do you need more details about my config?
Thanks for your help!
* I didn’t expect you to respond directly, but I just wanted to take the opportunity to say that I’m a big fan of your work