Check out example codes for "The "@angular/compiler-cli" package was not properly installed.". It will help you in understanding the concepts better.

Code Example 1

rm -rf node_modules dist
npm uninstall -g @angular/cli
npm cache clean

Code Example 2

npm install -g @angular/[email protected]
npm install
ng serve

Learn ReactJs, React Native from akashmittal.com