# 错误：缺少 Suspense 边界。页面使用了流式渲染，但没有 Suspense 边界包裹异步组件。

- **ID:** `nextjs/suspense-boundary-missing-streaming`
- **领域:** nextjs
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 93%

## 根因

一个使用流式渲染的异步服务器组件（例如，通过等待一个 promise）没有被包裹在 Suspense 边界中，导致 Next.js 在流式渲染期间无法渲染回退 UI。

## 版本兼容性

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

## 解决方案

1. ```
   Wrap the async component in a Suspense boundary in the parent layout or page.
   ```
2. ```
   Use the loading.js file at the same route segment level to provide a default Suspense boundary.
   ```

## 无效尝试

- **** — This converts the component to a client component, which cannot use async/await at the top level, causing a different error (async/await not supported in Client Components). (90% 失败率)
- **** — This changes the data fetching pattern and may break server-side rendering benefits. It also requires converting to a client component, which may not be desired. (60% 失败率)
