Next.js Attempting to Pre-Render route.ts Files
(1 min read) Your route.js / route.ts likely needs to force dynamic rendering. export const dynamic = "force-dynamic"; Otherwise during the build process. Next will try and pre-render that page. That means it calls APIs, needs process.env, etc. It will do this even though route.* would lead you to believe