当我使用 ng build 时,停止 angular cli 要求收集分析 [英] Stop angular cli asking for collecting analytics when I use ng build
本文介绍了当我使用 ng build 时,停止 angular cli 要求收集分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试使用 gitlab CI/CD 构建和部署我的项目时,Angluar CLI 会询问以下问题:
Angluar CLI is asking the following question when I am trying to build and deploy my project using gitlab CI/CD:
> @angular/cli@8.0.0 postinstall /workspace/node_modules/@angular/cli
> node ./bin/postinstall/script.js
? Would you like to share anonymous usage data with the Angular Team at Google u
nder
Google’s Privacy Policy at https://policies.google.com/privacy? For more details
and
how to change this setting, see http://angular.io/analytics. (y/N)
当然,我无法在 CI/CD 管道中输入任何内容.我怎样才能防止 angular cli 提出这个问题?
Of course I cannot input anything in the CI/CD pipeline. How can I can prevent angular cli from asking this question?
推荐答案
我遇到了同样的问题:Angular CLI 的新分析功能阻塞了我的 CI:https://travis-ci.org/LVM-IT/lvo-logging-lib.解决方法:设置环境变量NG_CLI_ANALYTICS等于ci
I had the same problem: The new analytics feature of Angular CLI was blocking my CI: https://travis-ci.org/LVM-IT/lvo-logging-lib. Solution: set the environent variable NG_CLI_ANALYTICS equal to ci
export NG_CLI_ANALYTICS=ci
这篇关于当我使用 ng build 时,停止 angular cli 要求收集分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文