Stack: Nextjs (
next export) +
@netlify/plugin-nextjs - v4.12.2
I’m trying to use
nextjs redirects in the
next.config.js as they should be supported by now by the
I have seen the order of redirects evaluation here and I’m sure the points 1-3 are not applied in my case, so the plugin should take the redirects from the config.
next export in the build process and I have the plugin active. The error message that I get is:
3:35:20 PM: 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. 3:35:20 PM: Your publish directory is set to "out", but in most cases it should be ".next". 3:35:20 PM: If you are using "next export" then you should set the environment variable NETLIFY_NEXT_PLUGIN_SKIP to "true".
So far I was using the
NETLIFY_NEXT_PLUGIN_SKIP set to
true to fix that error, however I’d like to use the redirects from
next.config.js which apparently can’t be done as the plugin is skipped due to
Is there a way how to make these
next.config.js redirects work with configuring the plugin to work with
Thanks in advance!