Skip to content

How do I resolve a 'process.env.CI = true' error?

The Treating warnings as errors because process.env.CI = true. error is a build error that can appear with create-react-app builds. In summary, React warnings are being treated as build errors. This article covers how you can bypass this build error.

Why this Happens

When the "Automatically expose System Environment Variables" setting is checked in the project's Environment Variables settings, the Environment Variable with the Name as CI and with the Value as true is exposed. This causes create-react-app to treat React warnings as build errors.

guide resolve process env ci auto expose
Selecting to automatically expose System Environment Variables in your Vercel Project.

How to Resolve

If you wish to change these errors back to warnings, add an Environment Variable to the Environment Variables UI with the Name as CI and the Value as false. This will override the System Environment Variable. Once added, redeploy your project.

guide resolve process ci true add env var
Adding an Environment Variable with the Name as CI and the Value as false.

Couldn't find the guide you need?