ng new has stopped working after updating to Angular 6

前端 未结 4 1256
庸人自扰
庸人自扰 2020-12-10 18:30

Today, I updated my angular cli to the latest version and encountered an error that stops me from creating a new Angular project. Following is the error log that I get after

4条回答
  •  自闭症患者
    2020-12-10 18:39

    That happened to me, I thought that was a bug I reported it here, it turned out that I had a folder named node_modules on my home directory!

    To make sure this is the same issue with you run following commands

    npm ls -g @schematics/angular
    npm ls @schematics/angular 
    

    If the output of second command contains

    npm ERR! extraneous: @schematics/angular@0.6.0 C:\Users\User\node_modules\@angular\cli\node_modules\@schematics\angular
    

    then most likely you have the same issue as it appears that there is a node_modules folder with both the CLI and an old version of @schematics/angular installed locally (C:\Users\User). Remove this to fix this issue.

    Please check if it is the case for you too.

提交回复
热议问题