#Lexical - Can't yarn generate:types with BlocksFeature

3 messages · Page 1 of 1 (latest)

rocky bone
#

Hello there,
I have an issue while using the BlocksFeature with lexical. When I tried to generate type it threw a TypeError.
I want to allow only blocks in my Page Collection. If I removed the use of BlockFeatures it generates the type without issues.
I removed richText from my block to test with simple type like text but it changes nothing

Please find screenshots of the related code and the errors below:

test-payloadcms-website-2024/node_modules/@payloadcms/richtext-lexical/dist/field/features/Blocks/index.js:84 (0, _utilities.fieldsToJSONSchema)({}, [ ^ TypeError: (0 , _utilities.fieldsToJSONSchema) is not a function at modifyOutputSchema (/Users/romain.bernard/Development/_PERSO/_TEST/test-payloadcms-website-2024/node_modules/@payloadcms/richtext-lexical/dist/field/features/Blocks/index.js:84:59) at Object.outputSchema (/Users/romain.bernard/Development/_PERSO/_TEST/test-payloadcms-website-2024/node_modules/@payloadcms/richtext-lexical/dist/index.js:597:32) at /Users/romain.bernard/Development/_PERSO/_TEST/test-payloadcms-website-2024/node_modules/payload/dist/utilities/configToJSONSchema.js:150:56 at Array.reduce (<anonymous>) at fieldsToJSONSchema (/Users/romain.bernard/Development/_PERSO/_TEST/test-payloadcms-website-2024/node_modules/payload/dist/utilities/configToJSONSchema.js:81:47) at /Users/romain.bernard/Development/_PERSO/_TEST/test-payloadcms-website-2024/node_modules/payload/dist/utilities/configToJSONSchema.js:383:49 at Array.forEach (<anonymous>) at /Users/romain.bernard/Development/_PERSO/_TEST/test-payloadcms-website-2024/node_modules/payload/dist/utilities/configToJSONSchema.js:382:36 at Array.reduce (<anonymous>) at fieldsToJSONSchema (/Users/romain.bernard/Development/_PERSO/_TEST/test-payloadcms-website-2024/node_modules/payload/dist/utilities/configToJSONSchema.js:81:47)

Thanks!

fluid jungleBOT
rocky bone
#

Hi again,
I've just seen you fixed this issue with v2.10. It's okay now 🙂