After we update to nextjs 16 vercel production build started to give this error: Error: Builder returned invalid routes: should match pattern “^[a-zA-Z0-9_ :;.,”'?!(){}\[\]@<>=+*#$&`|~\^%/-]+$"
Before update there was 0 issues on deployment. I checked my routes they look okay. I tried to add trailingSlash: false then skipTrailingSlashRedirect: true on next.config no success. tried to disable cacheComponents no success. tried to minimize next.config and proxy.ts files like to default ones still no success. even removed generateSitemaps or metadata generation etc no success.
Local build and local vercel builds are working without error.
Do you have a link to the project ID for this so i can check the logs?
There were no changes in route pattern generation between 15 to 16 however we do enable Turbopack by default, so this could be a turbopack specific quirk
This migration guide contains all the differences, once we find out what the culprit is here I can work internally to get better errors/guidanced surfaced here
Hi @bulutyerli, just checking in to see if you were able to resolve the “Builder returned invalid routes” issue after updating to Next.js 16 or if you still need assistance. Let me know how it’s going!