Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile Error #281

Open
dodomui opened this issue Mar 30, 2020 · 3 comments
Open

Compile Error #281

dodomui opened this issue Mar 30, 2020 · 3 comments

Comments

@dodomui
Copy link

dodomui commented Mar 30, 2020

ERROR in ./node_modules/ionic-image-loader/dist/providers/image-loader.js
[ng] Module not found: Error: Can't resolve 'rxjs/observable/fromEvent' in '/Users/../../node_modules/ionic-image-loader/dist/providers'
ERROR in ./node_modules/ionic-image-loader/dist/providers/image-loader.js
[ng] Module not found: Error: Can't resolve 'ionic-angular' in '/Users/../../node_modules/ionic-image-loader/dist/providers'

Received above error, I did try change ionic-angular to @Ionic-Angular can solve this error.
May I know how to solve the rxjs issue?

Here is my enviroment

Ionic:

   Ionic CLI                     : 6.3.0 (/Users/nelsonmui/.nvm/versions/node/v12.16.1/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.0.7
   @angular-devkit/build-angular : 0.803.25
   @angular-devkit/schematics    : 8.3.25
   @angular/cli                  : 8.3.25
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 1.5.2
   @capacitor/core : 1.5.2

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : none
   Cordova Plugins   : no whitelisted plugins (0 plugins total)

Utility:

   cordova-res (update available: 0.11.0) : 0.9.0
   native-run                             : 0.3.0

System:

   ios-deploy : 1.10.0
   NodeJS     : v12.16.1 (/Users/nelsonmui/.nvm/versions/node/v12.16.1/bin/node)
   npm        : 6.14.4
   OS         : macOS Catalina
   Xcode      : Xcode 11.4 Build version 11E146
@maxtomczyk
Copy link

Hi!
Same problem here. I managed to fix rxjs import problem by changing:

import { fromEvent } from 'rxjs/observable/fromEvent';

to:

import { fromEvent } from 'rxjs';

However, fixing this is temporary, because you are editing code which is built and stored in node_modules. I will try to find some other solution.

@maxtomczyk
Copy link

It looks like there is another branch for Ionic 4, but it didn't work for me on Ionic 5.
https://github.com/zyra/ionic-image-loader/tree/v4

@dodomui
Copy link
Author

dodomui commented Oct 8, 2020

@maxtomczyk It is working for me on Ionic 5 + capacitor using this branch.
The problem I'm facing now is the image cache not really working on iOS device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants