Error: The directory "/opt/build/repo/.next" does not contain a Next.js production build. Perhaps the build command was not run, or you specified the wrong publish directory.
In most cases it should be set to ".next", unless you have chosen a custom "distDir" in your Next config.
If you are using "next export" then you should set the environment variable NETLIFY_NEXT_PLUGIN_SKIP to "true".
Plugin "@netlify/plugin-nextjs" failed
Error: The directory "/opt/build/repo/.next" does not contain a Next.js production build. Perhaps the build command was not run, or you specified the wrong publish directory. In most cases it should be set to ".next", unless you have chosen a custom "distDir" in your Next config. If you are using "next export" then you should set the environment variable NETLIFY_NEXT_PLUGIN_SKIP to "true".