Skip to content

Warning in Next.js serverActions mod #87

@icetee

Description

@icetee

Versions

  • @prismicio/next: 1.3.5
  • next: 13.5.3
  • node: 18.18.0

Reproduction

I just want to use the PrismicNextLink component as it is in the example. But it throws an error when I set the following in the next.config.js:

  experimental: {
    serverActions: true,
  },
<PrismicNextLink field={item.menu_item_link} >
  {item.menu_item}
</PrismicNextLink>

I would need the new serverActions mode.

Additional Details
Warning: An empty string ("") was passed to the href attribute. To fix this, either do not render the element at all or pass null to href instead of an empty string. at a at LinkComponent (webpack-internal:///(ssr)/./node_modules/next/dist/client/link.js:105:19) at PrismicNextLink2 (webpack-internal:///(ssr)/./node_modules/@prismicio/next/dist/PrismicNextLink.js:18:99)

Steps to reproduce

You need to set the serverActions parameter in the next.config.js.

What is expected?

What is actually happening?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions