ng serve not working in windows

KRUSHANU MOHAPATRA picture KRUSHANU MOHAPATRA · Mar 6, 2018 · Viewed 14.6k times · Source

I did an

npm i
npm -g @angular/cli

Then when I do

ng serve

I am getting this error

enter image description here

But I I put ng serve in npm script (npm start in package.json) it works.

Answer

Sajeetharan picture Sajeetharan · Mar 6, 2018

You need to install angular-cli and create a project using ng command.

You can follow the steps here

npm uninstall -g angular-cli @angular/cli
npm cache clean
npm install -g @angular/cli