I got this error upgrading from Angular 11 to Angular 13. This is the fix, run this in your terminal

rm package-lock.json
rm node_modules
rm dist 

npm cache clean --force
npm install

 

 

 

Saved you some valuable time?

Received 100 so far from 4 kind contributors.