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

Streaming(edge): static routes are caught by top root level dynamic routes #35451

Closed
1 task done
huozhi opened this issue Mar 19, 2022 · 1 comment · Fixed by #32601
Closed
1 task done

Streaming(edge): static routes are caught by top root level dynamic routes #35451

huozhi opened this issue Mar 19, 2022 · 1 comment · Fixed by #32601

Comments

@huozhi
Copy link
Member

huozhi commented Mar 19, 2022

Verify canary release

  • I verified that the issue exists in Next.js canary release

Provide environment information

    Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101
    Binaries:
      Node: 14.17.0
      npm: 8.5.5
      Yarn: 1.22.15
      pnpm: 6.11.0
    Relevant packages:
      next: 12.1.1-canary.14
      react: 18.0.0-rc.2
      react-dom: 18.0.0-rc.2

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

Top level dynamic routing component catches the routes of static files, leading to 404 for all static files

Expected Behavior

Dynamic routes shouldn't effect the static routes

To Reproduce

Create repro app with following code snippet

// pages/[...slug].js
export default () => 'slug'

// pages/index.js
export default () => 'index'

Set up global runtime option in next.config.js for streaming

module.exports = {
  experimental: {
    runtime: 'edge'
  }
}
  • Run next dev
  • Visit localhost:3000/, it works and show index
  • Visit other routes like localhost:3000/foo, checkout network panels, all static routes requests failed with 404
@huozhi huozhi changed the title Streaming: static routes are caught by top root level dynamic routes Streaming(edge): static routes are caught by top root level dynamic routes Mar 23, 2022
@huozhi huozhi linked a pull request Mar 23, 2022 that will close this issue
4 tasks
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant