It has been mentioned in an earlier answer. But I started getting ERROR RuntimeError: NG0203 after I started my upgrade to Angular 19. After hours messing around with anything related to injection. I found removing @angular in the 'paths' in tsconfig.json did the trick.
Try removing :
"paths": {
"@angular/*": ["./node_modules/@angular/*"],
}