Skip to content

Commit 8812151

Browse files
Fix: Properly disable middleware to resolve MIDDLEWARE_INVOCATION_FAILED
- Replaced commented middleware with empty export to disable it completely - Cleared .next build cache to remove stale middleware compilation - Root cause: Next.js was still compiling and invoking commented middleware 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent e49b67d commit 8812151

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/middleware.ts

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
// Middleware temporarily disabled for debugging
2-
// import { NextResponse } from 'next/server';
3-
// import type { NextRequest } from 'next/server';
1+
// This file is intentionally empty to disable middleware
2+
// Removing this file entirely or commenting it out doesn't work
3+
// because Next.js still tries to compile it if it exists.
4+
// This empty export prevents middleware from running.
45

5-
// export function middleware(request: NextRequest) {
6-
// return NextResponse.next();
7-
// }
8-
9-
// export const config = {
10-
// matcher: [
11-
// '/api/:path*'
12-
// ],
13-
// };
6+
export {};

0 commit comments

Comments
 (0)