Description
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Fri Jan 27 02:56:13 UTC 2023
Binaries:
Node: 18.16.0
npm: 9.6.5
Yarn: 1.22.19
pnpm: 8.4.0
Relevant packages:
next: 13.4.1
eslint-config-next: 13.4.1
react: 18.2.0
react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Metadata (metadata, generateMetadata, next/head, head.js)
Link to the code that reproduces this issue
https://github.com/TheEdoRan/nextjs-metadata-bug
To Reproduce
- Create a Next project
- Set
experimental.serverActions
to true in next.config.js - Export
metadata
objects from pages - Use
<Link>
to navigate between them
Describe the Bug
When enabling experimental.serverActions
flag in next.config.js, metadata updating on navigation breaks.
The first time you navigate to a page it works as it should, but then if you try again it breaks and meta tags stay the same.
Expected Behavior
Meta tags are updated on navigation.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response