How to prevent Netlify from treating warnings as errors because process.env.CI = true?

Dick Lucas picture Dick Lucas · Jun 16, 2020 · Viewed 13k times · Source

Deploying new projects started failing on Netlify. Checking the logs I see something that was not in the logs on previous successful deploys:

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

How can I fix my build?

Answer

aldobsom picture aldobsom · Jun 20, 2020

You need to have CI to be false during your build command.

Go to: https://app.netlify.com/sites/mysales-krohne/settings/deploys > Build command and change it to:

CI=false npm run build

Now, rebuild your deployment. Should be no problem anymore.