Exception - Could Not Find Module “@angular-devkit/build-angular”

Exception: Could not find module “@angular-devkit/build-angular”
 
This is one error which we face sometimes if we get an Angular solution of TFS, git, devops or version control. When you run the solution then you will get  this error:
 
An unhandled exception occurred: Could not find module “@angular-devkit/build-angular” 
 
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 most of the cases, this command will solve your problem, however sometimes, because of the version, we need to run some more commands.
 
In some cases,
 
npm install
ng update
 
and finally,
 
npm update
 
In this way, we can resolve this error and run the solution smoothly.