#SlugComponent that ships with Payload CMS not working

2 messages · Page 1 of 1 (latest)

patent rock
#

I took in the SlugComponent in order to be able to get a nice out of the box slug feature with Payload CMS, however, now for some reason it's not loading:

 ⨯ TypeError: Cannot destructure property 'config' of '(0 , _chunk_CQQHQHCB_js__WEBPACK_IMPORTED_MODULE_10__.b)(...)' as it is undefined.
    at SlugComponent (fields/slug/SlugComponent.tsx:26:47)
  24 |   const checkboxFieldPath = path?.includes(".") ? `${path}.${checkboxFieldPathFromProps}` : checkboxFieldPathFromProps;
  25 |
> 26 |   const { value, setValue } = useField<string>({ path: path || field.name });
     |                                               ^
  27 |
  28 |   const { dispatchFields } = useForm();
  29 | {
  digest: '3014834128'
}

I straight up copied it in from this: https://github.com/payloadcms/payload/blob/main/templates/website/src/fields/slug/SlugComponent.tsx

GitHub

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for buildi...

golden joltBOT