Hi,
thanks for the example and the video.
Unfortunately with v3 released, this example is outdated.
[Function: CustomSelectComponent]
⨯ node_modules/.pnpm/payload@3.2.2_graphql@16.9.0_monaco-editor@0.52.0_react-dom@19.0.0-rc-66855b96-20241106_react_2wvkd4npc2dg5f3kjasvewy6ly/node_modules/payload/dist/bin/generateImportMap/index.js (81:1) @ addToImportMap
⨯ Error: addToImportMap > Payload component must be an object or a string
at async IndexPage (./src/app/[locale]/(frontend)/page.tsx:57:21)
digest: "2847518325"
79 | if (typeof payloadComponent !== 'object' && typeof payloadComponent !== 'string') {
80 | console.error(payloadComponent);
> 81 | throw new Error('addToImportMap > Payload component must be an object or a string');
| ^
82 | }
83 | if (Array.isArray(payloadComponent)) {
84 | for (const component of payloadComponent){
I also get this TypeScript-Error for the Component.
types.d.ts(127, 9): The expected type comes from property 'Field' which is declared here on type '{ Cell?: CustomComponent; Description?: CustomComponent<FieldDescriptionClientComponent | FieldDescriptionServerComponent>; Field?: CustomComponent<...>; Filter?: PayloadComponent; } | ... 20 more ... | ({ ...; } & { ...; })'
Thanks!
Hi,
thanks for the example and the video.
Unfortunately with v3 released, this example is outdated.
I also get this TypeScript-Error for the Component.
Thanks!