knvgpt
July 10, 2022, 1:21pm
1
Hi, hope y’all are doing fine.
I have a small react project, and I am trying to host it on Netlify, using continuous deployment, but the issue is it throws errors building on Netlify, but works fine on my machine.
can someone please tell me what is going wrong here.
here’s the build log.
Change your build command to CI= npm run build
.
knvgpt
July 10, 2022, 4:11pm
3
hrishikesh:
CI= npm run build
Thank you so much it worked, but could you explain why please.
Here you go:
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…
Compare that with the yellow line in your log