Skip to content

Middleware does not function in Next.js 13 while using Turbopack #42921

@scissorhands26

Description

@scissorhands26

Verify canary release

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

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Wed Mar 2 00:30:59 UTC 2022
Binaries:
  Node: 19.0.0
  npm: 8.19.2
  Yarn: N/A
  pnpm: N/A
Relevant packages:
  next: 13.0.3-canary.4
  eslint-config-next: 13.0.3
  react: 18.2.0
  react-dom: 18.2.0

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

Using next dev --turbo causes middleware not to execute.

Expected Behavior

Using next dev --turbo should not affect middleware execution.

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

https://github.com/scissorhands26/nextjs-13-middleware-turbopack-bug

To Reproduce

Use middleware in conjunction with the pages or app directory, and add the --turbo flag to "dev": "next dev --turbo".

Metadata

Metadata

Assignees

Labels

MiddlewareRelated to Next.js Middleware.WebpackRelated to Webpack with Next.js.locked

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions