Description
I just debugged for half a day to find out why I couldn't deploy to Netlify; even though I was following all of the tutorials and example projects, everything worked fine locally, and I tried a thousand things. Ultimately, I realized that my project still had NETLIFY_NEXT_PLUGIN_SKIP
set to true
in the Netlify GUI. This is also a shortcoming of Netlify.
But it would be great if the plugin could output at least one line telling the user that the plugin will skip steps. What is even more confusing is that the onBuild
actually gets logged, and the only thing that made me suspicious was that it took only 3ms.
11:27:36 PM: 3. @netlify/plugin-nextjs (onBuild event)
11:27:37 PM: Post processing - HTML
11:27:36 PM: ────────────────────────────────────────────────────────────────
11:27:36 PM:
11:27:36 PM:
11:27:36 PM: (@netlify/plugin-nextjs onBuild completed in 3ms)
A simple "Skipping onBuild
because of NETLIFY_NEXT_PLUGIN_SKIP
" would be super helpful for other unfortunate souls in the future and won't hurt anyone else.