Like what we’re doing? Star us on GitHub!

Problems with implementing the SEO Plugin

falko100
6 months ago
1 1

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.

  • DanRibbens
    Payload Team
    6 months ago

    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.

    2 replies
  • falko100
    6 months ago

    It does go away when I comment it out. I'll investigate a bit more and will let you know.

  • falko100
    6 months ago

    Yep, I tried as they have it in the demo and it works perfectly. Thanks. 😩

Open the post
Continue the discussion in GitHub
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More