Stop angular cli asking for collecting analytics when I use ng build
I used the command,
ng analytics off
and the prompt was not shown again.
Reference: https://angular.io/analytics#disabling-usage-analytics
To solve this, run the command appointing to /dev/null
sudo npm install -g @angular/cli > /dev/null
Add following property to angular.json
file:
"cli": {
"analytics": false
}
I had the same problem: The new analytics feature of Angular CLI was blocking my CI: https://travis-ci.org/LVM-IT/lvo-logging-lib. Solution: set the environent variable NG_CLI_ANALYTICS equal to ci
export NG_CLI_ANALYTICS=ci
see: https://github.com/LVM-IT/lvo-logging-lib/blob/329d014aa34dea49522f036e8d0b3aa3f71e33e7/.travis.yml#L16
Link to ng-cli Analytics