Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Server Component] TypeError: Cannot read properties of undefined (reading 'link') #27491

Open
kingyue737 opened this issue Jun 8, 2024 · 1 comment

Comments

@kingyue737
Copy link

kingyue737 commented Jun 8, 2024

Environment


  • Operating System: Linux
  • Node Version: v18.20.3
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: npm@10.2.3
  • Builder: -
  • User Config: devtools
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-ndhpvf

Describe the bug

Click the button to toggle prop text of server component MyComponent.

The first time, it renders correctly. But when I click once more. It shows the following error:

TypeError: Cannot read properties of undefined (reading 'link')

It seems to be a cache error

Additional context

If I remove Math.random(), no error occurs.

Can also reproduce locally:


  • Operating System: Windows 11
  • Node Version: v20.13.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: pnpm@9.2.0

Logs

No response

Copy link

stackblitz bot commented Jun 8, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants