question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RxJS 6: Cannot find module 'rxjs/operators'

See original GitHub issue

Hi 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:open
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
developerjohan01commented, May 19, 2018

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:

import { animationFrameScheduler, Observable, range, zip } from 'rxjs';
import { map } from 'rxjs/operators';

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

2reactions
apai4commented, May 9, 2018

@LayZeeDK it looks like the issue is actually coming from Number.MAX_SAFE_INTEGER in fizzbuzz.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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found