CircleCI build failed due to Google anonymous usage data question

前提是你 提交于 2020-07-08 11:43:43

问题


While CircleCI build, in the processes of executing sudo npm install -g @angular/cli Google asked to share anonymous data usage yes/no question. How can I avoid prompt of that question in CircleCI ?

Image of docker is circleci/node:8 Command run: sudo npm install -g @angular/cli

Error message:

#!/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)

This question is about CircleCI build and this is not a solution for me. I can't get this solution implemented in CircleCI.


回答1:


You can let your angular know that it's being built in CI by defining environmental variable NG_CLI_ANALYTICS=ci. Or just disable usage analytics question completely with NG_CLI_ANALYTICS=false.

Refer to angular-cli/docs/design/analytics.md:Disabling Usage Analytics for more information.




回答2:


I was able to solve the issue by making few changes.

  1. New angular-cli@8 does not support node@8. So I change my code to npm install -g @angular/cli to npm install -g @angular/cli@7.3.9

  2. Also at the end of the line > /dev/null part was added. npm install -g @angular/cli@7.3.9 > /dev/null



来源:https://stackoverflow.com/questions/56477891/circleci-build-failed-due-to-google-anonymous-usage-data-question

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!