---
title: How do I resolve a 'process.env.CI = true' error?
description: Information on resolving a 'process.env.CI = true' error.
url: /kb/guide/how-do-i-resolve-a-process-env-ci-true-error
canonical_url: "https://vercel.com/kb/guide/how-do-i-resolve-a-process-env-ci-true-error"
published: 2025-11-03
last_updated: 2026-07-16
authors: Sam Ko
related:
  - /docs/concepts/projects/environment-variables
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---
<!-- docsgraph:related -->
## Related pages

> **For AI agents:** Follow these links to understand how this page connects to the rest of the Vercel ecosystem. For the full cross-link map (inbound, outbound, prerequisites, and semantic neighbors), see the .graph.md link below.

- [Managing Environment Variables](https://vercel.com/docs/environment-variables/managing-environment-variables?from=related) — Learn how to create and manage environment variables for Vercel.
- [Manage Across Environments](https://vercel.com/docs/environment-variables/manage-across-environments?from=related) — Add, sync, and verify environment variables across development, preview, production, and custom environments using the C
- [Sensitive Environment Variables](https://vercel.com/docs/environment-variables/sensitive-environment-variables?from=related) — Environment variables that cannot be decrypted once created.
- [vercel env](https://vercel.com/docs/cli/env?from=related) — Learn how to manage your environment variables in your Vercel Projects using the vercel env CLI command.
- [Troubleshoot Build Errors](https://vercel.com/docs/deployments/troubleshoot-a-build?from=related) — Learn how to resolve common scenarios you may encounter during the Build step, including build errors that cancel a depl
- [How do I migrate away from \\`vercel.json\\` env and build.env?](https://vercel.com/kb/guide/how-do-i-migrate-away-from-vercel-json-env-and-build-env?from=related) — Information on how to migrate your \\`vercel.json\\` environment variables to the Environment Variables UI.
- [Dependencies from package.json are missing after install](https://vercel.com/kb/guide/dependencies-from-package-json-missing-after-install?from=related) — Understand why dependencies may not being installed during a build and how to fix.
- [How to add and manage environment variables on Vercel](https://vercel.com/kb/guide/how-to-add-vercel-environment-variables?from=related) — Add environment variables to Vercel through the dashboard, CLI, or REST API, scope them to each environment, and pull th
- [How do I resolve a 'module not found' error?](https://vercel.com/kb/guide/how-do-i-resolve-a-module-not-found-error?from=related) — Information on resolving a 'module not found' error.
- [How do I use the "Ignored Build Step" field on Vercel?](https://vercel.com/kb/guide/how-do-i-use-the-ignored-build-step-field-on-vercel?from=related) — Instructions on how to use the "Ignored Build Step" field to programmatically prevent a new deployment from being built.

Full cross-link map for this page: [/kb/guide/how-do-i-resolve-a-process-env-ci-true-error.graph.md](/kb/guide/how-do-i-resolve-a-process-env-ci-true-error.graph.md)
<!-- /docsgraph:related -->


The `Treating warnings as errors because process.env.CI = true.` error is a build error that can appear with [create-react-app](https://create-react-app.dev/) 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](https://vercel.com/docs/concepts/projects/environment-variables#system-environment-variables)" setting is checked in the project's [**Environment Variables**](https://vercel.com/docs/concepts/projects/environment-variables#declare-an-environment-variable) [settings](https://vercel.com/docs/concepts/projects/environment-variables#declare-an-environment-variable), 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.

## How to Resolve

If you wish to change these errors back to warnings, add an [Environment Variable](https://vercel.com/docs/concepts/projects/environment-variables) 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.