/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
errors/import-next.mdx
19 строк
636 B
Delba de Oliveira
docs: Move pages from Config section into guides (#78496)
24 апр 2025, 15:28
Не верифицирован
24 апр 2025, 15:28
7a64ada
Код
Авторство
О чём код?
--- title: 'Invalid `next` Import' --- ## Why This Error Occurred Somewhere in your application, you imported `next` directly which is only meant to be used with legacy custom servers. You should not import `next` inside of pages or components. ## Possible Ways to Fix It Ensure any usage of `import next from "next"` is specific to custom server usage and isn't included in your pages or components. Also ensure any type imports are kept inside of TypeScript files e.g. ensure `import { PageConfig } from 'next'` isn't used in JavaScript files. ## Useful Links - [Custom Server Documentation](/docs/pages/guides/custom-server)