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

Warning: invalid next.config.js options detected #105

Open
devuxer opened this issue Jul 31, 2022 · 11 comments
Open

Warning: invalid next.config.js options detected #105

devuxer opened this issue Jul 31, 2022 · 11 comments

Comments

@devuxer
Copy link

devuxer commented Jul 31, 2022

When 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);
@mikerudge
Copy link

+1

@madmed88
Copy link

madmed88 commented Aug 3, 2022

I started seeing similar errors when I upgraded to next 12.2.2, I went back to version 12.2.0 and the errors went away. There is a similar issue in the next.js repo vercel/next.js#38967, it looks like it was fixed in 12.2.3 but I did not test it yet.

@peterjurco
Copy link

I also started to experience these messages after update of Next. It seems that even Next 12.2.4 hasn't fixed that yet.

@kasvith
Copy link

kasvith commented Aug 11, 2022

yep still on next 12.2.4

@Webbrother
Copy link

The same for 12.2.5

@MarkLyck
Copy link

This seems to be more of a problem with next-plugin-antd-less than next itself.

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?

@0fan
Copy link

0fan commented Nov 2, 2022

+1

@samyarkd
Copy link

Same issue, anyone found any solutions for this? And should i be worried about this ?

@kasvith
Copy link

kasvith commented Jan 17, 2023

Upgrade to latest Ant Design Version, You may not need this anymore(can configure designs with a provider)

@samyarkd
Copy link

Upgrade to latest Ant Design Version, You may not need this anymore(can configure designs with a provider)

By latest ants version you version 5?

Well Im afraid to mess stuff up by upgrading

@kasvith
Copy link

kasvith commented Jan 17, 2023

By latest ants version you version 5?

Yeah, for my usecase we had also some breaking changes. But did it anyway because it was annoying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants