Skip to content

Commit

Permalink
Add canary warning for node middleware (#76292)
Browse files Browse the repository at this point in the history
This matches our PPR warning for node middleware while we
experiment/validate it further.
  • Loading branch information
ijjk authored Feb 20, 2025
1 parent fc14d78 commit 8102bc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/next/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -647,5 +647,6 @@
"646": "No span found for compilation",
"647": "@rspack/core is not available. Please make sure `@next/plugin-rspack` is correctly installed.",
"648": "@rspack/plugin-react-refresh is not available. Please make sure `@next/plugin-rspack` is correctly installed.",
"649": "Cache handlers not initialized"
"649": "Cache handlers not initialized",
"650": "experimental.nodeMiddleware"
}
2 changes: 2 additions & 0 deletions packages/next/src/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ function assignDefaults(
throw new CanaryOnlyError('experimental.dynamicIO')
} else if (result.experimental?.turbo?.unstablePersistentCaching) {
throw new CanaryOnlyError('experimental.turbo.unstablePersistentCaching')
} else if (result.experimental?.nodeMiddleware) {
throw new CanaryOnlyError('experimental.nodeMiddleware')
}
}

Expand Down

0 comments on commit 8102bc5

Please sign in to comment.