Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the problem that @ angular/cli installation needs to confirm whether to agree to use data collection when docker builds angular applications

Shulou Source: shulou.com Published: 2022-06-01 01:38:58 11月01日 Update

This post is about how to fix the problem of @angular/cli installation needing to confirm consent to data collection when docker builds angular apps. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

When installing @angular/cli, you need to confirm your consent to data collection.

> @angular/cli@9.1.13 postinstall /web/node_modules/@angular/cli> node ./ bin/postinstall/script.js? Would you like to share anonymous usage data with the Angular Team at Google underGoogle's Privacy Policy at https://policies.google.com/privacy? For more details andhow to change this setting, see http://angular.io/analytics. (y/N)

There are no problems during daily use, but when you need to build angular apps in docker, the docker build process is suspended and the compilation cannot be completed.

At this time, you need to add the following configuration to Dockerfile. The default configuration is to close cli to collect usage data.

RUN export NG_CLI_ANALYTICS=false

With the above environment variable added, there is no pause in feedback when building mirrors.

Thank you for reading! About "how to solve docker angular application @angular/cli installation needs to confirm whether to agree to use data collection problem" This article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Tags: Data problems applications content more articles processes configurations good practical variables such as above articles environment see knowledge mirroring reference help related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Microsoft Shulou Technology Linux OPPO Reno