Runtime.ImportModuleError - Error: Cannot find module '../../../.next/required-server-files.json

After Latest Build we are getting the following error

Runtime.ImportModuleError: Error: Cannot find module '../../../.next/required-server-files.json'
Require stack:
- /var/task/.netlify/functions-internal/_api_auth_auth0-SPLAT-handler/_api_auth_auth0-SPLAT-handler.js
- /var/task/_api_auth_auth0-SPLAT-handler.js
- /var/runtime/index.mjs
    at _loadUserApp (file:///var/runtime/index.mjs:951:17)
    at async Object.UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:976:21)
    at async start (file:///var/runtime/index.mjs:1137:23)
    at async file:///var/runtime/index.mjs:1143:1

  • we have not changed the given function for a long time and the version of next.js and auth0-next.js also hasn’t changed for a lone time.
1 Like

name of website .

We are also seeing this error - looks like yesterday’s release of @netlify/plugin-nextjs broke it.

We’ve mitigated this issue by locking the build plugin to an earlier version (4.26) - you can do that by adding @netlify/plugin-nextjs@4.26 as a dev dependency.

Make sure you don’t delete the versionless plugin from netlify.toml or it won’t build.

Thanks for the report. I’m rolling back the auto-installed version to 4.26.0 while we investigate. Could anyone experiencing this let me know if they’re using a monorepo, or if there’s anything unusual about their setup?

in our case, we are using monorepo.

1 Like

We are also using a monorepo

I’ve isolated the problem and will have a fix out shortly. Thanks everyone for your information.

Has a solution for this been release already? I am on @netlify/plugin-nextjs 4.36.0 and I still see this issue

Please share your site @KrustyC.