# 错误：并行路由插槽 '@slot' 需要 Suspense 边界或 default.tsx

- **ID:** `nextjs/parallel-route-slot-missing-suspense`
- **领域:** nextjs
- **类别:** build_error
- **验证级别:** ai_generated
- **修复率:** 95%

## 根因

在 Next.js app 目录中，并行路由插槽（例如 @modal）必须包裹在 Suspense 边界中，或具有 default.tsx 文件来处理插槽未匹配时的加载状态。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| next@14.2.0 | active | — | — |
| next@14.3.0 | active | — | — |
| next@15.0.0 | active | — | — |

## 解决方案

1. ```
   在布局文件中将并行路由插槽包裹在 Suspense 边界中。
   ```
2. ```
   在插槽目录中创建 default.tsx 文件来处理未匹配的路由。
   ```

## 无效尝试

- **** — This may cause layout shifts or missing UI because the slot renders nothing when unmatched, but the error persists if the slot is still not wrapped in Suspense. (50% 失败率)
- **** — This eliminates the feature, which may not be acceptable for modals or complex layouts. (90% 失败率)
