Root cause: Next.js 16 defaults to Turbopack for builds, but Payload CMS's richtext-lexical imports .css files that fail during route collection in Node ESM context. Fix: add @payloadcms/richtext-lexical and @payloadcms/next back to serverExternalPackages so Next.js skips their internal imports during route collection. Use --webpack explicitly since Turbopack production builds are incompatible with Payload (payloadcms/payload#14786). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3.4 KiB
3.4 KiB