Skip to content

"Field appears twice" error on save/hotreload #10

Open
@tobedamobe

Description

@tobedamobe

Hey folks! I am running into an anoying error and I don’t know why. I am developing a payload plugin and all seems to run fine.

https://github.com/art-design-digital/payload-plugin-seo

Bildschirmfoto 2024-03-25 um 13 01 32

But there is a quite anoying error when saving my plugin main file or any other imported components. The plugin crashes the whole backend and throws the error that I have a field twice in my code. I think I know what’s happening here: the hot reload reloads the plugin with all of its fields but somehow some parts of the plugin stays rendered and so there are two fields with the same name. But I don’t know why or how to avoid it.

A hard reload of the backend fixes it but the next saving of a tsx or ts file is never to far away 😉

Btw: all is fine when I work in my scss files. No error here.

Can you help me?
If you need more info please tell me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions