Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

lexical editor Crashes in Payload 3.0

default discord avatar
altoorlast year
1

I get the following error when trying to go into a collection with a lexical editor:



TypeError: Cannot destructure property 'config' of '(0 , _chunk_6IWEPNUV_js

WEBPACK_IMPORTED_MODULE_10

.b)(...)' as it is undefined.


at Ge (webpack-internal:///(app-pages-browser)/./node_modules/@payloadcms/richtext-lexical/node_modules/@payloadcms/ui/dist/exports/client/index.js:6118:127)


...........



My Package.json contains the following dependencies:



"dependencies": {


"

@967091941873426493

/db-mongodb": "3.0.0-beta.126",


"

@967091941873426493

/live-preview-react": "3.0.0-beta.126",


"

@967091941873426493

/next": "3.0.0-beta.126",


"

@967091941873426493

/richtext-lexical": "3.0.0-beta.126",


"autoprefixer": "^10.4.19",


"graphql": "^16.8.1",


"next": "15.0.3",


"payload": "3.0.0-beta.126",


"react": "^19.0.0-rc-65a56d0e-20241020",


"react-dom": "^19.0.0-rc-65a56d0e-20241020",


"sharp": "^0.33.3",


"uuid": "^10.0.0"


},



My default buildconfig looks like this (Yes, it's messy, I'm moving the homePage and Users Config to a different file asap:



export default buildConfig({


admin: {


user: Users.slug,


},


editor: lexicalEditor({


features: ({ defaultFeatures }) => [


...defaultFeatures,


HTMLConverterFeature(),


BlocksFeature({


blocks: [


ImageLinkBlock


],


}),


],


}),


globals: [


{


slug: "homePage",


fields: [


{


name: "title",


type: "text",


},


{


name: "content",


type: "richText",


maxDepth: 2


},


lexicalHTML("content", {


name: "content_html",


}),


],


},


Footer,


],


});



For anyone having this issue, i fixed it by using pnpm instead of npm and reinstalling everything 🙂

  • default discord avatar
    jamescoursonlast year

    This also worked for me

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.