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

navigation from pages directory to app does not refresh page which results in a blank page #65554

Open
bestLessons opened this issue May 9, 2024 · 0 comments
Labels
bug Issue was opened via the bug report template. Navigation Related to Next.js linking (e.g., <Link>) and navigation.

Comments

@bestLessons
Copy link

bestLessons commented May 9, 2024

Link to the code that reproduces this issue

https://github.com/bestLessons/next-js-routing-issue

To Reproduce

  1. Open /me page. There should be 2 buttons. Each of them uses router.push to navigate to different pages which are located in the app directory
image
  1. Click on Go to /john/posts/lorem-slug button - page is blank
  2. Press reload the page button in the browser
image
  1. Page loads correctly and there should be some content
image

Attaching also video reproduction of the issue
https://github.com/vercel/next.js/assets/16179389/ddcd4612-6eb4-47fc-a7d7-ce787ba3e876

Current vs. Expected behavior

When navigating from pages directory to app I expect full page reload which will load page correctly instead of seeing the blank page as it is now

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
  Available memory (MB): 65536
  Available CPU cores: 10
Binaries:
  Node: 20.10.0
  npm: 10.2.3
  Yarn: 1.22.21
  pnpm: N/A
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Navigation

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local), Other (Deployed)

Additional context

Seems like issue happens because of catchAll route which is in the pages directory
image

there are 2 routes which are similar

app      [username]/posts/[slug]/page.tsx
pages  [username]/[...directLinkId].tsx
@bestLessons bestLessons added the bug Issue was opened via the bug report template. label May 9, 2024
@github-actions github-actions bot added the Navigation Related to Next.js linking (e.g., <Link>) and navigation. label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Navigation Related to Next.js linking (e.g., <Link>) and navigation.
Projects
None yet
Development

No branches or pull requests

1 participant