当我使用ng build时停止angular cli要求收集分析 [英] Stop angular cli asking for collecting analytics when I use ng build

查看:86
本文介绍了当我使用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管道中输入任何内容.我如何才能防止成角度的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:

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

请参阅: https://github .com/LVM-IT/lvo-logging-lib/blob/329d014aa34dea49522f036e8d0b3aa3f71e33e7/.travis.yml#L16

链接到ng-cli Analytics

这篇关于当我使用ng build时停止angular cli要求收集分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆