I am getting this error while running my application. Here are the details of my application.
Angular CLI: 7.3.3
Node: 10.15.1
Angular: 7.2.7
@angular-de
Try update the package.json file from
"@angular-devkit/build-angular": "^0.800.1"
to
"@angular-devkit/build-angular": "^0.12.4"
Then run npm install in the command line.
In your package.json change the devkit builder.
"@angular-devkit/build-angular": "^0.800.1",
to
"@angular-devkit/build-angular": "^0.10.0",
it works for me.
good luck.
Everyone is focusing on downgrading @angular-devkit/build-angular
version to X, or upgrading @angular/cli
version to Y or latest.
However, Please do not blindly suggest an X or Y or latest
as answers. (Though usually, downgrading devkit should be better because upgrading CLI is a breaking change)
The correct version to choose, always depends on your Angular (angular-cli) version.
Angular CLI v8.3.19 -> 0.803.19
Angular CLI v8.3.17 -> 0.803.17
Angular CLI v7.3.8 -> 0.13.8
Angular CLI v6-lts -> 0.8.9
For other specific versions, visit: https://github.com/angular/angular-cli/tags. Find your CLI version, and in some tags, they do mention the corresponding versions for @angular-devkit/**
packages.
Note: If you want to upgrade your CLI version, you should first consider upgrading to latest of your major version, do not simply jump to the next major version.
On my side it was package
@angular-devkit/build-angular
and
@angular-devkit/build-ng-packagr
was not the same version, Updating build-ng-packagr
to same version as build-angular
fixed my problem.
I changed @angular-devkit/build-angular": "0.9.0.1"
to @angular-devkit/build-angular": "0.13.4"
and it worked.
I also faced this issue and struggled hours to solve it, I have tried all of the above options but nothing solved my problem. This issue occurs due to version mismatch of angular/cli and angular-devkit, so I did the following :
Manually changed version of files:
@angular-devkit/build-angular": "^0.13.9",
@angular/cli": "~7.0.3",
//This is for Angular7, for Angular8 : 0.803.23
Deleted package-lock.json
It solved my problem.