Home
Support Forums

Nextjs Starter for Blog

It won’t finish building. Error: Deploy failed due to an error in @netlify/plugin-nextjs plugin.

  • Plugin “@netlify/plugin-nextjs” failed

Error: The directory “dist” 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 the Essential Next.js plugin should be removed. See Build Plugins | Netlify Docs for details.

In “onBuild” event in “@netlify/plugin-nextjs” from Netlify app at Object.checkNextSiteHasBuilt (/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/helpers/verification.js:67:16) at onBuild (/.netlify/plugins/node_modules/@netlify/plugin-nextjs/lib/index.js:24:24)

Link to template:Nextjs Starter for Blog

That starter is probably old and you should try upgrading it to modern codebase.