#Block types not generated

1 messages · Page 1 of 1 (latest)

barren cairnBOT
red sluice
#

Block types are not generated. config.ts is in src/blocks/Banner, this is the content of the file```ts
import type { Block } from 'payload'

import {
FixedToolbarFeature,
InlineToolbarFeature,
lexicalEditor,
} from '@payloadcms/richtext-lexical'

export const Banner: Block = {
slug: 'banner',
fields: [
{
name: 'style',
type: 'select',
defaultValue: 'info',
options: [
{ label: 'Info', value: 'info' },
{ label: 'Warning', value: 'warning' },
{ label: 'Error', value: 'error' },
{ label: 'Success', value: 'success' },
],
required: true,
},
{
name: 'content',
type: 'richText',
editor: lexicalEditor({
features: ({ rootFeatures }) => {
return [...rootFeatures, FixedToolbarFeature(), InlineToolbarFeature()]
},
}),
label: false,
required: true,
},
],
interfaceName: 'BannerBlock',
}

young arrow
#
 "scripts": {
        "dev": "next dev",
        "build": "BUILD=true next build",
        "start": "next start",
        "lint": "next lint",
        "payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload"
    },

payload generate:types

#

maybe this can help you ?

rose void
rose void
#

thats why typed wont be generated then

#

config cant pick it up

red sluice
#

Ah, ok. I'm slowly bringing the things I need from the website template over to my project as the website template seems to be too complex and interconnected to just rename the posts to news and delete what I don't need

barren cairnBOT