I have installed Angular/cli and then try to run command ng serve then below error is throwing. I have tried lot of thing like uninstall angular/cli, npm cache clean, etc
In the case of deployment, it is a good idea to add a preinstall script to address these gaps in dependencies:
preinstall
"preinstall": "npm install @angular/cli @angular/compiler-cli typescript"