[Fixed] Xh.Subject is not a constructor Angular 11

Issue

I updated my project from ng 9 to ng 11, locally everything works fine but when I deploy my code to the server and try to login, I am getting Xh.Subject is not a constructor as an error.
I looked here for an answer, and found needed to replace ‘rxjs/subject’ with rx/js, which I did in all components that had that reference, and deployed, but still getting the same error.
Does anyone know what else could be causing this error in angular?

Solution

I was able to resolve this, it turns out after doing a search through vs code on the node_modules folder, I found an old package that was still referencing { Subject } from ‘rxjs/subject’ updated that package and was able to get my application to launch.

Leave a Reply

(*) Required, Your email will not be published