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

前端 未结 7 1448
长发绾君心
长发绾君心 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:20

    Simply change the build command to:

    CI= yarn build
    

    or

    CI= npm build
    

    Like the other posts said, it is due to the CI, so any warning will stop the build. The lines above just means, setting the CI variable to nothing, and then start the command yarn build.

提交回复
热议问题