ionic-image-loader icon indicating copy to clipboard operation
ionic-image-loader copied to clipboard

Compile Error

Open dodomui opened this issue 5 years ago • 3 comments

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

dodomui avatar Mar 30 '20 02:03 dodomui

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 avatar Apr 06 '20 19:04 maxtomczyk

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

maxtomczyk avatar Apr 06 '20 19:04 maxtomczyk

@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.

dodomui avatar Oct 08 '20 05:10 dodomui