Beginning on June 15, 2020 Netlify will start a gradual rollout of adding the environment variable
CI to build environments, with the value of
true . This environment variable, short for Continuous Integration, is commonly set in various CI environments like Travis CI and Github Actions, among many others. The ecosystem has largely agreed to use this environment setting to detect when a build is executing in a CI environment, as opposed to a local development environment.
This setting allows many common libraries to detect a CI environment and change behavior accordingly. One such behavior is the disabling of progress “spinners” that while useful in a local development terminal, can render poorly when operating in a log streamed CI environment.
However, one concern is that some libraries may now interpret what were previously just warnings as hard errors that will halt a build. The intention is that developers should not ship potentially broken configurations, but the downside is that builds that successfully completed previously may fail after this change. If you believe that your build is breaking after this change, you can disable this behavior by unsetting the
CI variable in your build. For example, the following will unset
CI for the NPM command:
CI= npm run build
If you would like to test this behavior in your build environment ahead of June 15th, you can explicitly set the
CI variable in your build or explicitly for an individual command like:
CI=true npm run build
Update (from comment below):
Just a few clarifications on how to disable this. If your build command is
npm run build , then you can disable it by setting a custom build command in the UI under your site’s Build Settings to:
CI= npm run build
or if you are using
netlify.toml to set the build command, update it as such:
... command = "CI= npm run build" ...
Either option should work. You should see this build command reflected in the build output as well.
There is one more way to affect this behavior: you could instead choose to set the environment variable
CI to empty in either the toml’s
[build] section(s) or in our UI, in the Deploy Settings → Environment variables configuration section of our UI.
Let us know if you have any questions in the thread below!