0

I have a app which is being build on circleCI. After upgrading angular from 7 to 9, installing cli on circleCI started prompting

  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) 

And I cannot choose anything as it's CI. I found this and this, but none of this helped. I tried to Put it in config.yml on different ways, but none of them worked. Anyone knows how should I insert the variable?

Here is part of my config.yml file:

executors:
  node:
    docker:
      - image: circleci/node:11.6-browsers

    working_directory: ~/repo

commands:
  install_angularcli:
    description: Install angular-cli
    steps:
      - run: sudo npm install -g @angular/cli

jobs:
  build:
    executor: node
    environment:
      - NG_CLI_ANALYTICS: "ci"
Panda-313
  • 820
  • 5
  • 5

1 Answers1

1

I couldn't get the environment variable approach to work on circleci. Instead I did the following:

sudo npm install -g @angular/cli > /dev/null

Which is one of the answers in this post.

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

I also needed to upgrade my docker NodeJS version to 10.13 or later (as per the Angular Update Guide).

docker:
  - image: circleci/node:10.17
Matthew
  • 2,871
  • 5
  • 34
  • 59