How to prevent Netlify from treating warnings as errors because process.env.CI = true?

前端 未结 7 1435
长发绾君心
长发绾君心 2021-02-18 23:39

Deploying new projects started failing on Netlify. Checking the logs I see something that was not in the logs on previous successful deploys:

Treating warnings a         


        
7条回答
  •  爱一瞬间的悲伤
    2021-02-19 00:15

    On June 15 2020 Netlify made a configuration change "adding the environment variable CI to build environments, with the value of true." In your Build and Deploy settings on Netlify change your build command to CI= npm run build. This will prevent Netlify from treating warnings as errors. More discussion on this issue can be found in Netlify's forums.

提交回复
热议问题