-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop Treating warnings as errors because process.env.CI = true. #3657
Comments
Hi! We've had a large discussion about this previously and decided that this is the best default behavior. If you'd like to not use this behavior, simply set |
pass warning as local build facebook/create-react-app#3657
hi @Timer! can you please provide a link to the discussion where it was decided to treat errors as warnings? Couldn't find it. |
What about the other direction? What if I'd like to treat warnings as errors locally? Am I supposed to manually set the I'd prefer the default is to always treat warnings as errors, regardless of the environment, and give people some way to opt out if they think they know what they're doing (such as @Bamieh). |
…I` environment variable. See facebook/create-react-app#3657.
I am wondering what else is it using the env var CI ... if you set it to false beside the error/warning behavior is something else affected by this env var? |
@mhermosi to my knowledge the test script is affected. If CI is false then it goes into a watch mode which is something you do not want on a CI-server. So how do we opt out from "treat errors as warnings" while not using a watcher in the tests? Am I missing something? |
I think this is weird implementation as well. There should be a way to keep |
Hello,
When running the
react-scripts build
on the CI, the build script does the followingThis is due to this line of code.
I disagree with treating the CI differently during the build as it creates inconsistency between local environment and the CI. I pushed the code to github knowingly about the warnings, having the CI break from the warning I approved of pushing is rather unexpected to the user.
The text was updated successfully, but these errors were encountered: