0

I recently upgraded my Angular project from v7 to v9. When deploying it to Jenkins it gets stuck at the below message as soon as any 'ng' command encountered. "Would you like to share anonymous usage data about this project with the Angular Team".

Initially the issue popped up when installing @angular-cli and devops team fixed that by setting the env variable NG_CLI_ANALYTICS=ci. Now the same message appearing again at the first use of 'ng' (ng lint && ng test) and it waits for the inputs.

I've tried to set environment variable NG_CLI_ANALYTICS with various values(i.e. off, false, CI) but nothing working for me. I have also tried to add "ng analytics off" as a first command using 'ng' (ng analytics off && ng lint && ng test) but that is also not working.

please suggest what can be the issue with the project.

I have tried most of the tricks suggested in the posts below with no luck. Travis build is hanging waiting for user input (To install angular) CircleCI build failed due to Google anonymous usage data question

Thanks in advance.

Pradeep
  • 19
  • 5

1 Answers1

0

This issue is fixed finally. The Fix in package.json add below script: "test" = export NG_CLI_ANALYTICS=false || set NG_CLI_ANALYTICS=false && ng test(any other task using 'ng').

Initially I added 'NG_CLI_ANALYTICS=false' in 'environment.prod.ts' file but that didn't worked (Don't know why).

Pradeep
  • 19
  • 5