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.

Module not found: Error: Can't resolve rxjs/*

See original GitHub issue

im using lib in my project

Angular CLI: 6.0.0-rc.2
Node: 8.11.1
OS: win32 x64
Angular: 6.0.0-rc.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cdk: 6.0.0-rc.1
@angular/cli: 6.0.0-rc.2
@angular/material: 6.0.0-rc.1
@angular-devkit/architect: 0.5.4
@angular-devkit/build-angular: 0.5.4
@angular-devkit/build-optimizer: 0.5.4
@angular-devkit/core: 0.5.4
@angular-devkit/schematics: 0.5.4
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 6.0.0-rc.2.4
@schematics/angular: 0.5.4
@schematics/update: 0.5.4
typescript: 2.7.2
webpack: 4.5.0

it was working on 1.7.4 with 5.x rxjs

today i tried to update to cli rc2 and rxjs rx1 and got this

ERROR in ./node_modules/ngx-infinite-scroll/modules/ngx-infinite-scroll.es5.js
Module not found: Error: Can't resolve 'rxjs/add/observable/fromEvent' in 'C:...node_modules\ngx-infinite-scroll\modules'
ERROR in ./node_modules/ngx-infinite-scroll/modules/ngx-infinite-scroll.es5.js
Module not found: Error: Can't resolve 'rxjs/add/observable/of' in 'C:...node_modules\ngx-infinite-scroll\modules'
ERROR in ./src/app/shared/form-utils/formpart-iban/formpart-iban.component.ts
Module not found: Error: Can't resolve 'rxjs/add/operator/distinctUntilChanged' in 'C:...src\app\shared\form-utils\formpart-iban'
ERROR in ./node_modules/ngx-infinite-scroll/modules/ngx-infinite-scroll.es5.js
Module not found: Error: Can't resolve 'rxjs/add/operator/do' in 'C:...node_modules\ngx-infinite-scroll\modules'
ERROR in ./node_modules/ngx-infinite-scroll/modules/ngx-infinite-scroll.es5.js
Module not found: Error: Can't resolve 'rxjs/add/operator/filter' in 'C:...node_modules\ngx-infinite-scroll\modules'
ERROR in ./node_modules/ngx-infinite-scroll/modules/ngx-infinite-scroll.es5.js
Module not found: Error: Can't resolve 'rxjs/add/operator/map' in 'C:...node_modules\ngx-infinite-scroll\modules'
ERROR in ./node_modules/ngx-infinite-scroll/modules/ngx-infinite-scroll.es5.js
Module not found: Error: Can't resolve 'rxjs/add/operator/mergeMap' in 'C:...node_modules\ngx-infinite-scroll\modules'
ERROR in ./node_modules/ngx-infinite-scroll/modules/ngx-infinite-scroll.es5.js
Module not found: Error: Can't resolve 'rxjs/add/operator/sampleTime' in 'C:...node_modules\ngx-infinite-scroll\modules'
ERROR in ./node_modules/ngx-infinite-scroll/modules/ngx-infinite-scroll.es5.js
Module not found: Error: Can't resolve 'rxjs/observable/of' in 'C:...node_modules\ngx-infinite-scroll\modules'

can you maybe add new rxjs syntax sing pipe() thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
aog1971commented, May 9, 2018

the problem is that the import is wrong if you use rxjs v6 in the file ngx-infinite-scroll.es5.js

incorrect: import {of} from ‘rxjs / observable / of’; import {fromEvent} from ‘rxjs / observable / fromEvent’;

Right: import {of, fromEvent} from ‘rxjs’;

4reactions
vladimirmiancommented, Sep 11, 2018

Maybe you can install rxjs-compat via npm. npm i rxjs-compat --save

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular - can't Resolve rxjs - Stack Overflow
I got this error because of an older version of rxjs and Angular 6 needs the latest version of rxjs. This command installs...
Read more >
how to fix Module not found: Error: Can't resolve 'rxjs ... - GitHub
The issue seems to be rxjs version not compatible with Angular 8.Try running this command once : npm install --save rxjs-compat and see...
Read more >
error: cannot find module 'rxjs' - You.com | The AI Search ...
Try setting the "moduleResolution": "node" inside your compileOptions to specify module resolution strategy for TS. npm install rxjs --save.
Read more >
Module not found: Error: Can't resolve 'rxjs/BehaviorSubject'
I was following an Angular Material tutorial and the author uses BehaviorSubject. I did exactly the same thing but I get an error...
Read more >
rxjs - npm
If you're using RxJS version below 7.2, you can pull in any operator you need from one spot, under 'rxjs/operators' . import {...
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