RxJS 6: Cannot find module 'rxjs/operators'
See original GitHub issueHi StackBlitz,
I have stumbled upon an error when developing a simple TypeScript StackBlitz using RxJS 6.1 (also 6.0). StackBlitz tells me Cannot find module 'rxjs/operators'
when trying to import an operator. The rxjs
module works well, but a simple import like import { map } from 'rxjs/operators';
results in the aforementioned error.
This is not just a static error. When I subscribe to fizzbuzz$
in https://stackblitz.com/edit/rxjs-fizzbuzz?file=index.ts, StackBlitz crashes entirely.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Cannot find module 'rxjs-compat/Observable' - Stack Overflow
From my experience with errors "Cannot find module 'rxjs-compat/Observable'", "Cannot find module 'rxjs-compat'" and etc.
Read more >Cannot find module 'rxjs-compat/Observable' error | bobbyhadz
To solve the error "Cannot find module 'rxjs-compat/Observable'", make sure to install the package by opening your terminal in your project's root directory...
Read more >Cannot find module "rxjs/operators" · Issue #104 - GitHub
Hi,. My App crash after installing your plugin. I got ' Cannot find module "rxjs/operators" ' error while the app is launching. If...
Read more >cannot find module 'rxjs/observable' or its corresponding type ...
It is due to mismatching of the version you downloaded and the angular version. You have to choose whether it is suitable or...
Read more >Angular – Cannot find module 'rxjs-compat/Observable'
ERROR in [at-loader] ./node_modules/rxjs/Observer.d.ts:1:15 TS2307: Cannot find module 'rxjs-compat/Observer'. ERROR in [at-loader] ./node_modules/rxjs/Operator ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Still looks like there is an issue with this. Creating a new TS project and adding the RxJS dependency. Now adding the imports used in the above projects, eg:
And you get the error:
Cannot find module 'rxjs/operators'
For an example see https://stackblitz.com/edit/typescript-dquxft?file=index.ts
If I clone one of the working projects above and use that as a starting point then it is working - same content/code and dependencies in both project. See https://stackblitz.com/edit/ts-rxjs6-test-ommwas?file=index.ts
@LayZeeDK it looks like the issue is actually coming from
Number.MAX_SAFE_INTEGER
infizzbuzz.ts
which is creating a loop that is too big for the browser to handle responsively. If you change the end of the range to something smaller the example seems to work fine:https://stackblitz.com/edit/rxjs-fizzbuzz-ybxwfj?file=fizzbuzz.ts