Next build hangs for react + next application

Hello guys I’m facing issues trying to build/deploy my react application , the npm run build command is working ok on my local environment and is taking about 2 minutes all the execution but on Netlify it hangs, here the screenshot logs :

Here my netlify.toml file :

command = “npm run build”
publish = “frontend/.next”

package = “@netlify/plugin-nextjs”

My build command :
“scripts”: {
“build”: “next build”,

Env vars:


Any advice or idea to debug this issue on netlify?

Thank you in advance ,

Hey there, :wave:

Welcome to the Netlify Forums :netliconfetti: Thanks for bringing this up! Sorry to hear you have encountered an obstacle.

I would suggest cross posting this on the essential next.js plugin repo. This way our next.js experts will see it a bit more quickly!

Please feel free to follow up here with a link to your issue once you do so, so that future Forums members can follow it should they encounter something similar.