errors/invalid-next-config.mdx
In your next.config.js file, you passed invalid options that either are the incorrect type or an unknown field. This warning is shown to help catch typos, deprecated or updated options.
You can use the NextConfig type to help ensure your config is correct.
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
/* config options here */
}
module.exports = nextConfig
Alternatively, you can use next.config.ts for better type safety and auto-completion:
import type { NextConfig } from 'next'
const nextConfig: NextConfig = {
/* config options here */
}
export default nextConfig
Some configuration options have been removed or updated in recent versions of Next.js. For example:
eslint configuration option has been removed from next.config. Remove the eslint option and use the ESLint CLI instead. See the ESLint documentation.experimental.turbo configuration has moved to a top-level turbopack configuration. See the turbopack option documentation.See the next.config.js docs for a list of all available and legacy options.