Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more details to invalid-next-config doc #42917

Merged
merged 1 commit into from Nov 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion errors/invalid-next-config.md
Expand Up @@ -2,7 +2,7 @@

#### Why This Error Occurred

In your `next.config.js` file you passed invalid options that either are the incorrect type or an unknown field.
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 that cause expected configs to not be applied.

#### Possible Ways to Fix It

Expand All @@ -19,6 +19,12 @@ const nextConfig = {
module.exports = nextConfig
```

For example for the below warning, there is a typo and `rewritess` needs to be renamed to `rewrites` to resolve the issue.

```sh
The root value has an unexpected property, rewritess, which is not in the list of allowed properties
```

### Useful Links

- [`next.config.js`](https://nextjs.org/docs/api-reference/next.config.js/introduction)