Build settings being ignored

I’m trying to do a Next.js deployment.

However, my “Build settings” are being ignored.
This is my config:
image

However, when building, I get this error:

* **Plugin "@netlify/plugin-nextjs" failed**

Error: The directory "/opt/build/repo/out" does not contain a Next.js production build. Perhaps the build command was not run, or you specified the wrong publish directory. Your publish directory is set to "out", but in most cases it should be ".next". If you are using "next export" then you should set the environment variable NETLIFY_NEXT_PLUGIN_SKIP to "true".

In "onBuild" event in "@netlify/plugin-nextjs" from Netlify app

Which is funny, because the error is due to the plugin taking that manually instead of what I said.

Error image

Solved. I had a netlify.toml generated automatically that I wasn’t aware of

Thanks for coming back and sharing this with the community!