I have created a angular project with Angular CLI: 1.6.3 Node: 9.4.0 OS: linux x64 version. But when want to run my angular app with command ng serve then fetch this error
I only installed my angular/cli using:
npm install -g @angular/cli@1.5.2
And I started getting this error.
Solution:
If your version is global and
If you don't mind the version of your angular/cli then type:
npm update -g @angular/cli
Just run:
npm install --save-dev @angular/cli@latest
In the project folder, to fix it.
Step 1: delete package-lock.json Step 2: npm update -g @angular/cli Step 3: update @angular/cli new version in package.json Step 4: npm install
It worked for me.