Build error: Treating warnings as errors because process.env.CI = true. Most CI servers set it automatically.
My OS: Windows 10
The error msg is self explanatory. Here is how I fixed it:
If you are using Windows OS, then first install the cross-env
as a dev dependency.(https://github.com/kentcdodds/cross-env).
Then update your build command in package.json as follows:
Ex: For a project using Create React App;
"build": "cross-env CI=false react-scripts build"
Done!