DEV Community

CHIN SHAN LEE
CHIN SHAN LEE

Posted on • Updated on

 

[React] Treating warnings as errors because process.env.CI = true.

yarn run v1.22.10
$ react-scripts build
Creating an optimized production build...

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

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


---End of Oryx build logs---
Oryx has failed to build the solution.
Enter fullscreen mode Exit fullscreen mode

This problem occurs when you push code with warning in console.

To disable this, follow these steps :

  1. go to your package.json
  2. add CI=false into scripts > build like below
{
"scripts": {
    "start": "react-scripts start",
    "build": "CI=false react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
}
Enter fullscreen mode Exit fullscreen mode

Then you can push the code again !
It should be successfully pushed.

Top comments (1)

Collapse
 
jefferson227 profile image
Jefferson Matheus

Simple and effective, just like as I needed. Thanks a lot!

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.