Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
364 views
in Technique[技术] by (71.8m points)

Stop angular cli asking for collecting analytics when I use ng build

Angluar CLI is asking the following question when I am trying to build and deploy my project using gitlab CI/CD:

> @angular/[email protected] 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) 
question from:https://stackoverflow.com/questions/56355499/stop-angular-cli-asking-for-collecting-analytics-when-i-use-ng-build

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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

Link to ng-cli Analytics


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...