Observable.fromEvent is not a function error after updating ionic-native to 4.10.0
See original GitHub issueionic-image-loader throws Observable.fromEvent is not a function error after updating ionic-native to 4.10.0.
Issue occurs on this line:
r.is("cordova") ? o.Observable.fromEvent(document, "deviceready").first().subscribe(function(t) { i.nativeAvailable ? i.initCache() : (i.isInit = !0, i.throwWarning("You are running on a browser or using livereload, IonicImageLoader will not function, falling back to browser loading.")) }) : (this.isInit = !0, this.throwWarning("You are running on a browser or using livereload, IonicImageLoader will not function, falling back to browser loading."))
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Observable.fromEvent is not a function - ionic-v3
ERROR Error : Uncaught (in promise): TypeError: WEBPACK_IMPORTED_MODULE_2_rxjs_Observable.Observable.fromEvent is not a function
Read more >Error Typeerror: Observable_1.Observable.From Is Not A ...
ionicimageloader throws Observable.fromEvent is not a function error after updating ionicnative to 4.10.0. Issue occurs on this line:.
Read more >Observable.fromEvent is not a function in prod mode Angular 6
I am working on angular project having one issue Observable.fromEvent is not a function. This issue arises in production build for angular 6 ......
Read more >firebase - UNPKG
If the encoder did not apply padding, the input length may not\r\n * be a multiple of 4 ... Detect Cordova / PhoneGap...
Read more >httparchive_js_2021_01_28.txt - Index of /
smoothScroll.js jstz.min.js sensor.js product.functions.js ... ral-1.6.2.js jquery.scrollify.js prebid-analytics-4.10.0.js main.5bdbddde.js jquery.
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
The issue happens when you have installed rxjs version 6+ On angular 6 or by installing the dependency manually, this will occur.
To temporarily fix it, I’ve cloned the repo, and edited the file providers/image-loader.ts.
Replacing:
import { Observable } from 'rxjs/Observable';
to:import { Observable, fromEvent } from 'rxjs';
On line 6. And, replacing:
Observable.fromEvent(document, 'deviceready').first().subscribe(res => {
to:fromEvent(document, 'deviceready').first().subscribe(function (res) {
on line 67I made the temporarily workaround until the repo gets updated. I can send an pull request too if the devs are interested.
I will update the repository and its dependency soon to reflect the latest rxjs changes.