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

前端 未结 7 1396
青春惊慌失措
青春惊慌失措 2020-12-29 21:05

Angluar CLI is asking the following question when I am trying to build and deploy my project using gitlab CI/CD:

相关标签:
7条回答
  • 2020-12-29 21:13

    use this commond to off...##

    ng analytics project off
    

    it works....

    0 讨论(0)
  • 2020-12-29 21:22

    Add following property to angular.json file:

      "cli": {
        "analytics": false
      }
    
    0 讨论(0)
  • 2020-12-29 21:22

    I used the command,

    ng analytics off

    and the prompt was not shown again.

    Reference: https://angular.io/analytics#disabling-usage-analytics

    0 讨论(0)
  • 2020-12-29 21:30

    For circle CI, this worked for me:

    - run:
        environment:
          NG_CLI_ANALYTICS: "ci"
        command: npm install
    
    0 讨论(0)
  • 2020-12-29 21:35

    To solve this, run the command appointing to /dev/null

    sudo npm install -g @angular/cli > /dev/null
    
    0 讨论(0)
  • 2020-12-29 21:38

    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

    0 讨论(0)
提交回复
热议问题