React deploy fails on Netlify, but works on local machine

Hi, hope y’all are doing fine.

I have a small react project, and I am trying to host it on Netlify, using continuous deployment, but the issue is it throws errors building on Netlify, but works fine on my machine.

can someone please tell me what is going wrong here.
here’s the build log.

Change your build command to CI= npm run build.

Thank you so much it worked, but could you explain why please.

Here you go:

Compare that with the yellow line in your log