Angular/CLI — auto reload doesn't happen

后端 未结 11 1832
既然无缘
既然无缘 2020-12-24 13:06

I recently started working with Angular/CLI tool, I\'m facing a problem while executing the file, that is when I run

ng serve 

then this c

11条回答
  •  梦毁少年i
    2020-12-24 13:24

    I met the problem when my devDependencies is Angular 7
    but install angular/cli of version 8.x.x

    "devDependencies": {
        "@angular-devkit/build-angular": "^0.13.8",
        "@angular/cli": "^7.3.8",
        "@angular/compiler-cli": "^7.2.12",
    }
    
    

    just remove the cli globally

    npm unintsall -g @angular/cli
    npm cache clean -f 
    

    check the state

    ng version # if remove successfully, the command would no work
    

    then install cli again

    sudo npm install @angular/cli@^7.3.8 -g
    

提交回复
热议问题