Hey everyone,
I’m currently working on my first Payload plugin and trying to use some sample Payload CMS components like RichText. However, I’m facing an issue where the module can’t be found.
Additionally, when trying to reuse Payload types after initializing my plugin, I can’t access them properly. For example:
Module '"payload"' has no exported member 'CookieSettings'. Did you mean to use 'import CookieSettings from "payload"' instead? ts(2614)
And another issue with component imports:
Cannot find module '@/components/RichText' or its corresponding type declarations. ts(2307)
My imports:
import { CookieSettings } from 'payload'
// import { CookieSettings } from 'payload/types'
import RichText from '@/components/RichText'
My component's path:
src/plugins/payload-plugin-cookie-consent/src/components/frontend/CookieConsent.tsx
Does anyone know how to resolve this? Any help would be greatly appreciated! 🙏