Build and Deploy fail due to missing @netlify/plugin-nextjs

I developed a website for a client and after making updates I’ve had two repeated build and deploy fails with the message:

Plugin “@netlify/plugin-nextjs” internal error
Could not import plugin:
Error: Cannot find module ‘next/dist/build/analysis/extract-const-value’
Require stack: …

From a quick Google search I see others have had the same issue and I should not need to install this plugin, as it is used automatically during builds of Next.js sites. I have not had this issue in the past nor recently.

Please help direct me to resolve. Thank you!

4 Likes

I just started seeing this issue today as well… nothing has changed on my codebase.

1 Like

we are also facing the same issue. nothing has changed in codebase.

1 Like

we are also facing the same issue. Just tried to remove “@netlify/plugin-nextjs” plugin in netlify.toml and deployment was successfull, but the page show “Not Found”.

We are also experiencing the issue today.

1 Like

+1 for me experiencing this as well.

Same issue here. I’ve been experiencing this for the past two commits.

We’re experiencing the same issue with no changes to our codebase

+1 experiencing the same issue on our nextjs app

Glad I’m not the only one. Tried removing the next.js plugin and re-adding, but now it seems I’m unable to re-add it either

Also facing the same issue since couple of hours

+1 experiencing the same issue on our nextjs app. We just removed only one environment variable

Looks like the solution for now is to change the Next.js version: [Bug]: Cannot find module 'next/dist/build/analysis/extract-const-value' · Issue #1690 · netlify/next-runtime · GitHub

Hey folks :wave:

Thanks so much for taking the time to report this to us! It looks like the issue @TimeChimp shared was closed and merged roughly four hours ago. Please let me know if you are still encountering obstacles.