eko
eko

Reputation: 40647

Cannot find module 'rxjs' or its corresponding type declarations.(2307) using Angular stackblitz

While using stackblitz with an Angular 12 - rxjs 7 project. I'm getting this error while trying to import a Subject:

Cannot find module 'rxjs' or its corresponding type declarations.(2307)

enter image description here

Am I using a wrong version of typescript?

Error stackblitz

Upvotes: 2

Views: 8695

Answers (1)

eko
eko

Reputation: 40647

This is happening due to the recent changes and the major RXJS upgrade from version 6 to 7.

If you upgrade your Typescript version something greater than 4.2.x, you shouldn't face the issue in a real life project. However, the error will still be there for now on stackblitz and codepen projects that use rxjs@7 for now.

Right now it's still a pinned issue on github: https://github.com/ReactiveX/rxjs/issues/6350

Upvotes: 4

Related Questions