---
title: "NUXT_E1006"
description: "onPrehydrate 未被构建管道处理。"
canonical_url: "https://nuxt.zhcndoc.com/docs/4.x/errors/e1006"
---
# E1006

`onPrehydrate()` 运行时未经过 Nuxt 构建管道转换。它需要在编译时处理，并且仅在服务器端工作，因此当它被 Nuxt 不会转译的依赖项调用时，就会出现这种情况。

## 解决方案

将有问题的库添加到 `nuxt.config.ts` 中的 `build.transpile`，这样构建流程就可以处理其 `onPrehydrate()` 调用。

::read-more{to="https://nuxt.zhcndoc.com/docs/4.x/api/composables/on-prehydrate"}
::


## Sitemap

See the full [sitemap](https://nuxt.zhcndoc.com/sitemap.md) for all pages.
