Treating warnings as errors because process.env.CI = true. Most CI servers set it automatically.

问题

通过控制台手动执行就不会有这样的错, 然后通过jenkins pipeline执行yarn build 后报错,如图所示Treating warnings as errors because process.env.CI = true. Most CI servers set it automatically._第1张图片

解决方法

改为执行CI=false yarn build or CI='' yarn build

原因

CI=true表示在自动化环境中运行对于警告类消息会导致失败

参考文档:https://docs.netlify.com/configure-builds/troubleshooting-tips/#build-fails-on-warning-message

你可能感兴趣的:(总结,CI/CD,jenkins,jenkins,pipeline)