silverwolf-x/project / errors /import-next.mdx
silverwolf-x's picture
download
raw
636 Bytes
---
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)

Xet Storage Details

Size:
636 Bytes
·
Xet hash:
b84497b4e68e84677e113132fd2e4cca20137f075b3caca965c8a5647d589f9e

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.