ng new has stopped working after updating to Angular 6

前端 未结 4 1260
庸人自扰
庸人自扰 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:57

    I also got this error when I tried to issue, ng new

    I later realized it was as a result of issuing "npm install @angular/cli" which created a node_modules folder, in the directory I was working.

    Remove "node_modules" folder, and create your project now with "ng new"

    Ps. with the angular 6 upgrade, the ng team must specify that you cant just run "npm install @angular/cli" anywhere you want, but only in the newly created project. I think this is a bit unfair to the newbies to angular

    Hope this helps

提交回复
热议问题