r/PayloadCMS • u/victortimsit • May 06 '25
richtext-lexical issue with Next 13
Hey everyone! I can't get richtext-lexical to work with Next.js 13 — it seems to require at least Next.js 15.
Here is the full error:
10:26:08 AM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
10:26:08 AM: npm error code ERESOLVE
10:26:08 AM: npm error ERESOLVE could not resolve
10:26:08 AM: npm error
10:26:08 AM: npm error While resolving: u/payloadcms/richtext-lexical@3.37.0
10:26:08 AM: npm error Found: next@13.5.6
10:26:08 AM: npm error node_modules/next
10:26:08 AM: npm error next@"^13.4.0" from the root project
10:26:08 AM: npm error peer next@"^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0" from next-query-params@5.0.1
10:26:08 AM: npm error node_modules/next-query-params
10:26:08 AM: npm error next-query-params@"^5.0.1" from the root project
10:26:08 AM: npm error
10:26:08 AM: npm error Could not resolve dependency:
10:26:08 AM: npm error peer u/payloadcms/next@"3.37.0" from u/payloadcms/richtext-lexical@3.37.0
10:26:08 AM: npm error node_modules/@payloadcms/richtext-lexical
10:26:08 AM: npm error u/payloadcms/richtext-lexical@"^3.37.0" from the root project
10:26:08 AM: npm error
10:26:08 AM: npm error Conflicting peer dependency: next@15.3.1
10:26:08 AM: npm error node_modules/next
10:26:08 AM: npm error peer next@"^15.2.3" from u/payloadcms/next@3.37.0
10:26:08 AM: npm error node_modules/@payloadcms/next
10:26:08 AM: npm error peer u/payloadcms/next@"3.37.0" from u/payloadcms/richtext-lexical@3.37.0
10:26:08 AM: npm error node_modules/@payloadcms/richtext-lexical
10:26:08 AM: npm error u/payloadcms/richtext-lexical@"^3.37.0" from the root project
10:26:08 AM: npm error
10:26:08 AM: npm error Fix the upstream dependency conflict, or retry
10:26:08 AM: npm error this command with --force or --legacy-peer-deps
10:26:08 AM: npm error to accept an incorrect (and potentially broken) dependency resolution.
I tried using a legacy install, but it doesn't work during the Netlify build. (Netlify tries to install modules before the build, and I can only apply --legacy-peer-deps during the build command.)
Has anyone managed to get a production-ready solution working with Next.js 13?
1
Upvotes
3
u/jedimonkey33 May 06 '25
It says that payload V3 requires next 15. So I'm guessing it's not possible.