you seem to not be depending on @angular/core and/or rxjs . this is an error. angular 6 code example
Example: You seem to not be depending on "@angular/core" and/or "rxjs". This is an error.
sudo npm uninstall -g angular-cli @angular/cli
npm cache clean --force
sudo npm install -g @angular/cli