rsnext/errors/invalid-next-config.md
JJ Kasper 62f3f87891
Add next.config.js validation with ajv (#38498)
* Add next.config.js validation with ajv

* update manifest

* update lib type

* remove old tests

* update to pre-build validation code

* ensure validate output is ncced

* Apply suggestions from code review

Co-authored-by: Steven <steven@ceriously.com>

* Add example of typing next.config.js

Co-authored-by: Steven <steven@ceriously.com>
2022-07-13 13:31:55 -05:00

609 B

Invalid next.config.js

Why This Error Occurred

In your next.config.js file you passed invalid options that either are the incorrect type or an unknown field.

Possible Ways to Fix It

Fixing the listed config errors will remove this warning. You can also leverage the NextConfig type by importing from next to help ensure your config is correct.

/**
 * @type {import('next').NextConfig}
 */
const nextConfig = {
  /* config options here */
}

module.exports = nextConfig