When implementing the SEO plugin I am getting a TypeScript error.
Can anyone point me at my mistake?
My payload.config.ts
:
export default buildConfig({
// Ommited because out of context
plugins: [
seo({
collections: ['pages'],
uploadsCollection: 'images',
}),
],
});
The error:
TS2322: Type '(config: Config) => Config' is not assignable to type 'Plugin'. Types of parameters 'config' and 'config' are incompatible.
I don't think the type error you shared is coming from the plugins of your config.
To rule this out, what happens if you comment out the plugins
from your config, does the error go away?
I just createed a new Payload TS project and added the seo plugin and it is working with your exact plugins
config. I can push to a sample repo if it helps or you can go look at the public-demo too.
Happy to help more if you can share the rest of your config or more specific lines of code to look at.
It does go away when I comment it out. I'll investigate a bit more and will let you know.
Yep, I tried as they have it in the demo and it works perfectly. Thanks. 😩
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.