Angular CLI gives me “TypeError: callbacks[i] is not a function” when I “ng serve”

前端 未结 12 1398
旧时难觅i
旧时难觅i 2020-12-08 02:26

I literally just made a fresh installation of the Angular CLI in order to try it out and I don\'t have a clue on what\'s causing the following error on the command line:

12条回答
  •  误落风尘
    2020-12-08 02:57

    Try to uninstall and reinstall Angular CLI :

    Global package:

    npm uninstall -g @angular/cli npm cache clean if npm version is > 5 then usenpm cache verifyto avoid errors (or to avoid using --force) npm install -g @angular/cli@latest

    Local project package:

    rm -rf node_modules dist # use rmdir /S/Q node_modules dist in Windows Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell npm install --save-dev @angular/cli@latest npm install

提交回复
热议问题