Skip to content

Link on error.vue fails to navigate to home page on dev #381

@maxmckenzie

Description

@maxmckenzie

When adding a link to a nuxt error.vue 404 page, the link fails to navigate with the following error

H3Error: You are using a defineOgImage() function in a client-only context. You must call this function within your root component setup, see https://github.com/nuxt-modules/og-image/pull/293.

Related PR #293

Reproduction example

There is a reproduction of this error in the following repo with steps to reproduce in the readme.

https://github.com/maxmckenzie/og-image-error-page-issue

You can patch this by wrapping defineOgImageComponent in if(import.meta.server)

But that is not ideal

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