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

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?

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

  - 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.

1 Like