👉An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json'

Solution: npm install --save-dev @angular-devkit/build-angular

👉ERROR in error TS2688: Cannot find type definition file for '$'.

solution: In the src/tsconfig.app.json file there must be  "$" included in the types array for compiler options.  removing it will fix the issue.

👉Seprating header and footer and using it as header and footer component.

step 1: make two-component header and footer 

cmd >   $  ng g c header 

             $  ng g c footer 

step 2: put HTML and its CSS in the respective folder.  and use selector like <app-header></app-header> and <app-footer></app-footer> in the main file in place of removed HTML