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

[Bug]: Next.js Link component causes navigation to a non-existent page in stories #30390

Open
Ronny-zzl opened this issue Jan 27, 2025 · 0 comments

Comments

@Ronny-zzl
Copy link

Describe the bug

When using the Link component from Next.js 15 within an appDirectory configuration, the component behavior is not properly overridden. This leads to navigating directly to nonexistent pages after clicking the link.

This behavior does not occur with Next.js 14.

Reproduction link

https://stackblitz.com/edit/github-6hzs76ok?file=src%2Fstories%2FHeader.tsx

Reproduction steps

  1. Go to the above link
  2. Go to a story of the Header component
  3. Click the link on the header, and the preview will crush

System

Storybook Environment Info:

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm <----- active
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @storybook/addon-essentials: ^8.6.0-alpha.2 => 8.6.0-alpha.2 
    @storybook/addon-interactions: ^8.6.0-alpha.2 => 8.6.0-alpha.2 
    @storybook/addon-onboarding: ^8.6.0-alpha.2 => 8.6.0-alpha.2 
    @storybook/blocks: ^8.6.0-alpha.2 => 8.6.0-alpha.2 
    @storybook/nextjs: ^8.6.0-alpha.2 => 8.6.0-alpha.2 
    @storybook/react: ^8.6.0-alpha.2 => 8.6.0-alpha.2 
    @storybook/test: ^8.6.0-alpha.2 => 8.6.0-alpha.2 
    storybook: ^8.6.0-alpha.2 => 8.6.0-alpha.2

Additional context

Proper behavior with Next.js 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Discussion
Development

No branches or pull requests

2 participants