Netlify BUILD on the netlify website fails, but works in my machine through netlify-cli

Briefly summarize the issues you have been experiencing.
I am trying to deploy a next.js site using netlify.

I could able to build the on the machine (Cleared cache and tried as well). But when I try to push it to my git repository and trigger auto deployment with netlify it is failing.

So, I have downloaded the Netlify-cli and tried using the command netlify build and it works like charm in my machine. I am sure there is NO issue with the NextJs build setup and code. Need help from understanding the cause for failure only on netflix.

Please provide a link to your live site hosted on Netlify
Site was not live due to this error

What have you tried as far as troubleshooting goes? Do you have an idea what is causing the problem?

  1. Building locally works fine
  2. Building locally with netlify build also works fine

Do you have any other information that is relevant, such as links to docs, libraries, or other resources?
Logs attached
https://app.netlify.com/sites/kind-shaw-2112fb/deploys/5ee4bb6dbc45a57c5a809b60

If i deploy from cli with netlify deploy --prod it deploys, but not from the netlify site

@SarathSantoshDamaraj does it work if you “Clear cache and deploy site”? For whatever reason, I’m running into an issue where subsequent deploys with the cache fail during the build step. I’m wondering if we are seeing the same issue.

hi there, i wonder if this is relevant at all?