This error occurs because of missing dev dependency which is introduced newly in Angular 6.0 and above.

Solution:

Install @angular-devkit/build-angular

npm install --save-dev @angular-devkit/build-angular
Or
yarn add @angular-devkit/build-angular --dev

In some cases

npm install

ng update

and finally

npm update

Regards

Leave a Reply

Your email address will not be published. Required fields are marked *