#Cannot destructure property 'config'... at RscEntryLexicalField (node_modules/@payloadcms/richtext-l

7 messages · Page 1 of 1 (latest)

jagged matrix
#

Hi,

I have fresh database setup in Payload 3.76 with Postgres DB and Next.js 16.2.0 Canary. I get this error when I try to create e.g. new page in Pages collection or new Post in Posts collection. I use website template. Anyone had this issue?

storefront:dev:  GET /api/payload-preferences/locale 200 in 11ms (compile: 4ms, render: 7ms)
storefront:dev:  GET /admin/collections/posts/create 200 in 153ms (compile: 11ms, proxy.ts: 14ms, generate-params: 14µs, render: 128ms)
storefront:dev:  GET /admin/collections/posts/1 200 in 194ms (compile: 5ms, proxy.ts: 4ms, generate-params: 14µs, render: 186ms)
storefront:dev:  GET /admin/collections/posts/1 200 in 181ms (compile: 15ms, proxy.ts: 27ms, generate-params: 13µs, render: 139ms)
storefront:dev: [browser] Uncaught TypeError: Cannot destructure property 'config' of '(0 , __TURBOPACK__imported__module__$5b$project$5d2f$apps$2f$storefront$2f$node_modules$2f40$payloadcms$2f$ui$2f$dist$2f$exports$2f$client$2f$chunk$2d$J46CQZ3T$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__$3c$export__c__as__useConfig$3e$__.useConfig)(...)' as it is undefined.
storefront:dev:     at RscEntryLexicalField (node_modules/@payloadcms/richtext-lexical/src/field/rscEntry.tsx:124:10)
storefront:dev:     at Array.forEach (<anonymous>:1:22)
storefront:dev:     at Array.forEach (<anonymous>:1:22)
storefront:dev:     at RootPage (../../node_modules/@payloadcms/next/src/views/Root/index.tsx:281:24)
storefront:dev:   122 |   }
storefront:dev:   123 |
storefront:dev: > 124 |   return <RichTextField {...props} />
storefront:dev:       |          ^
storefront:dev:   125 | }
storefront:dev:   126 |

All payload packages versions are pinned to 3.76.0. Same issue with newest Payload 3.77.0.

Thanks.

jagged matrix
#
yarn why @payloadcms/ui

=> Found "@payloadcms/ui@3.76.0"
info Reasons this module exists
   - "_project_#storefront" depends on it
   - Hoisted from "_project_#storefront#@payloadcms#ui"
   - Hoisted from "_project_#storefront#@payloadcms#next#@payloadcms#ui"
   - Hoisted from "_project_#storefront#@payloadcms#plugin-form-builder#@payloadcms#ui"
   - Hoisted from "_project_#storefront#@payloadcms#plugin-search#@payloadcms#ui"
   - Hoisted from "_project_#storefront#@payloadcms#plugin-seo#@payloadcms#ui"
   - Hoisted from "_project_#storefront#@payloadcms#richtext-lexical#@payloadcms#ui"
   - Hoisted from "_project_#storefront#@payloadcms#storage-gcs#@payloadcms#plugin-cloud-storage#@payloadcms#ui"
jagged matrix
#

Maybe that's issue because I'm using Next.js 16.2.0 Canary with cacheComponents: true? I thought it's supported already

jagged matrix
#

With cacheComponents: false still the same error.

jagged matrix