Plugin "@netlify/plugin-nextjs" internal error

Seems like there might be an issue with the nextjs plugin – builds were working fine yesterday, but are failing today.

Deploy log: Netlify App

This is what I’m seeing:

9:50:57 AM: Plugin “@netlify/plugin-nextjs” internal error
9:50:57 AM: Error message
9:50:57 AM: Error: ENOENT: no such file or directory, scandir ‘.next/serverless’

Resolved by creating a ‘next.config.js’ with the following:

module.exports = {
target: ‘serverless’

1 Like

Hey there, @jonambas :wave:

Thanks for coming back and sharing this solution! We appreciate it!