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

Catch-all route also intercepts and catches static assets and js chunks #73028

Open
Aerilym opened this issue Nov 21, 2024 · 0 comments
Open
Labels
bug Issue was opened via the bug report template. Navigation Related to Next.js linking (e.g., <Link>) and navigation. Runtime Related to Node.js or Edge Runtime with Next.js.

Comments

@Aerilym
Copy link
Contributor

Aerilym commented Nov 21, 2024

Link to the code that reproduces this issue

https://github.com/r6203/next-catch-all-bug

To Reproduce

  1. Create a catch-all route
  2. run next dev
  3. go to any static route or js chunk or view server logs to see chunks intercepted

Current vs. Expected behavior

Having a catch all route at the root of the app shouldn't intercept next generated assets or static assets.

Expect a working app where each non asset request resolves to the catch-all route but requests to next generated assets (_next/**/*) to resolve to the corresponding files.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #48-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 14:04:52 UTC 2024
  Available memory (MB): 60075
  Available CPU cores: 16
Binaries:
  Node: 22.2.0
  npm: 10.7.0
  Yarn: N/A
  pnpm: 9.9.0
Relevant Packages:
  next: 14.2.12 // An outdated version detected (latest is 15.0.3), upgrade is highly recommended!
  eslint-config-next: N/A
  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, Runtime

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

next dev (local), next start (local)

Additional context

For an in-production example of this issue with a workaround see https://github.com/session-foundation/websites/tree/main/apps/foundation

Note this is reopening this issue #67806

@Aerilym Aerilym added the bug Issue was opened via the bug report template. label Nov 21, 2024
@github-actions github-actions bot added Navigation Related to Next.js linking (e.g., <Link>) and navigation. Runtime Related to Node.js or Edge Runtime with Next.js. labels Nov 21, 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. Runtime Related to Node.js or Edge Runtime with Next.js.
Projects
None yet
Development

No branches or pull requests

1 participant