angular - 由于 Google 匿名使用数据问题,CircleCI 构建失败

标签 angular circleci

在 CircleCI 构建时,在执行 sudo npm install -g @angular/cli 的过程中,Google 要求共享匿名数据使用是/否问题。如何避免在 CircleCI 中出现该问题的提示?

docker的镜像是circleci/node:8 命令运行:sudo npm install -g @angular/cli

错误消息:

#!/bin/bash -eo pipefail

sudo npm install -g @angular/cli

/usr/local/bin/ng -> /usr/local/lib/node_modules/@angular/cli/bin/ng @angular/cli@8.0.1 postinstall /usr/local/lib/node_modules/@angular/cli node ./bin/postinstall/script.js ? Would you like to share anonymous usage data with the Angular Team at Google under 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) ?

Would you like to share anonymous usage data with the Angular Team at Google under 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) ?

Would you like to share anonymous usage data with the Angular Team at Google under 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) Too long with no output (exceeded 10m0s)

这个问题是关于 CircleCI 构建和 this对我来说不是一个解决方案。我无法在 CircleCI 中实现此解决方案。

最佳答案

您可以通过定义环境变量NG_CLI_ANALYTICS=ci让您的 Angular 知道它是在CI中构建的。或者使用 NG_CLI_ANALYTICS=false 完全禁用使用情况分析问题。

引用angular-cli/docs/design/analytics.md:Disabling Usage Analytics了解更多信息。

关于angular - 由于 Google 匿名使用数据问题,CircleCI 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56477891/

相关文章:

angular - 如何使用分页导出 Angular Material 表(mat-table)?

postgresql - 初始化数据库 : error: program "postgres" is needed by initdb but was not found using circleci ubuntu docker-compose docker-entrypoint-initdb. d

docker - 带有circleci的SpringBoot:错误:/bin/bash:docker:找不到命令

go - 仅在合并到 master 时运行任务

angular - 在 angular2 中使用 ts-mockito 模拟 getter

javascript - Protractor:访问返回对象的属性

angular - 如何在 Angular 2 的 ngFor 中选择所有已过滤的复选框?

angular - 如何使自定义表单组件与 Angular2 中的表单验证集成?

docker - CircleCI工作流程是否可以在第一步中创建Docker镜像,然后在第二步中测试该Docker镜像?

postgresql - CircleCI 2.0 中的多个 Postgres 数据库