Support Forums

Deployment on servers continues to fail

I need advice to debug deploy Netlify App

I am able to run my build locally, but it fails every-time on deploy on your servers. Thank you!

1 Like

Hi @_lucasjohnson

Because of this

Line 47:6:  React Hook useEffect has a missing dependency: 'fetchImages'.
Either include it or remove the dependency array  react-hooks/exhaustive-deps

This is possibly not an error, but a warning, however, as per the following lines, warning are treated as errors.

Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.

So you can fix this error by including the missing dependency (ideal) or change your build command to CI='' yarn build to change the behaviour (this may cause other build issues, or cause you React app to not run correctly, hence why it is better to fix the warning and not ignore it.)

1 Like

Hey thanks for the response. The React Hook error is just a warning so no problem there. I found the same answer you provided here [Solved] “Treating warnings as errors because of process.env.CI = true” - DEV Community which worked so thank you!

1 Like