Warning: invalid next.config.js options detected
See original GitHub issueWhen I start my Next.js app, I receive this warning:
warn - Invalid next.config.js options detected:
[
{
"instancePath": "",
"schemaPath": "#/additionalProperties",
"keyword": "additionalProperties",
"params": {
"additionalProperty": "lessVarsFilePath"
},
"message": "must NOT have additional properties"
}
]
See more info here: https://nextjs.org/docs/messages/invalid-next-config
My next.config.js file looks like this:
const withAntdLess = require("next-plugin-antd-less");
const config = {
lessVarsFilePath: "./src/front-end/styles/antd-variables.less",
webpack(config) {
return config;
},
images: {
domains: ["images.ctfassets.net"],
},
};
module.exports = withAntdLess(config);
Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:7
Top Results From Across the Web
Incompatible with next.js 12.2.0: "Invalid next.config.js ... - GitHub
When compiling with next.js 12.2.0, this warning is shown, even when an empty array is passed for the plugins parameter: warn - Invalid...
Read more >warning Invalid next.config.js when running project - nextJs
When I want to run my project i have these three warnings: 1- warn - Invalid next.config.js options detected: The root value has...
Read more >invalid-images-config - Next.js
Invalid images config. Why This Error Occurred. In your next.config.js file you provided an invalid config for the images field.
Read more >the request of a dependency is an expression nextjs - You.com
1- warn - Invalid next.config.js options detected: The root value has an unexpected property, webpack5, which is not in the list of allowed...
Read more >Plugins – Configuration – Intro to Next.js
The next.config.js file gives us the ability to do some powerful stuff. Because the config file has a convention, you should be able...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This seems to be more of a problem with
next-plugin-antd-lessthannextitself.I think in 12.2.2 next added warnings for extending the config with other keys, and this is a plugin that does that but shouldn’t.
Still happening in next 12.3.1 and this seems to be abandoned?
+1