This happens when ngcc (Angular compatibility compiler) is not finished doing what it does, you must have enabled ivy in your Angular project. read here for more info about ivy.
- First try to run
npm installagain, to see if it fixes your problem. - Try to run
ngccmanually. - remove this file
node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__ - If none of the above worked, then remove
node_modulesdirectory and trynpm iagain.