# How not to treat warnings as errors with Travis when involving React?

**URL:** <https://travis-ci.community/t/how-not-to-treat-warnings-as-errors-with-travis-when-involving-react/12416>\
**Category:** v2\
**Tags:** bug\
**Created:** [November 23, 2021, 8:31pm UTC](https://travis-ci.community/t/how-not-to-treat-warnings-as-errors-with-travis-when-involving-react/12416 "2021-11-23T20:31:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SolarUltima](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/solarultima/32/4019_2.png) [@SolarUltima](https://travis-ci.community/u/SolarUltima)\
**Post date:** [November 23, 2021, 8:31pm UTC](https://travis-ci.community/t/how-not-to-treat-warnings-as-errors-with-travis-when-involving-react/12416/1 "2021-11-23T20:31:20Z")

</div>

im doing a huge project in React obviously using Travis as my continuous integration system. When executing the process, Travis complains about warnings, and fails to compile because it indicates:

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

any idea what this could be causing this output?

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [November 23, 2021, 8:33pm UTC](https://travis-ci.community/t/how-not-to-treat-warnings-as-errors-with-travis-when-involving-react/12416/2 "2021-11-23T20:33:05Z")

</div>

You need to modify the rule of the build process in your `.travis.yml` file:

```auto
script:
  - CI=false npm run build
  - npm run docs

```

With that option, Travis just recognizes the `CI=false` to allow the system not to treat warnings as errors, this will allow you to go on and use Travis with your React project, as I’m familiar with this myself as I have a few React projects using Travis right now.
