zyra / ionic-image-loader

Ionic 2+ Component that loads images in a background thread and caches them for later use
MIT License
436 stars 137 forks source link

Uncaught Error: Can't resolve all parameters for ImageLoader: ([object Object], ?, [object Object], [object Object]). at syntaxError #264

Open AmineMediazain opened 4 years ago

AmineMediazain commented 4 years ago

any help ?

DevKailash commented 4 years ago

I am also facing the same issue, solution please??

reznov11 commented 4 years ago

Same here!! after a small changes to fit ionic 4, it shoots this error in console:

Uncaught Error: Can't resolve all parameters for ImageLoader: ([object Object], ?, ?, [object Object]).

lestrell commented 4 years ago

This is hacky, but you can run this script on post install or pre build: ` const fs = require("fs");

const filePaths = [ "./node_modules/ionic-image-loader/dist/providers/image-loader.js", "./node_modules/ionic-image-loader/dist/image-loader.module.js", "./node_modules/ionic-image-loader/dist/providers/image-loader.d.ts", ]; let replace = "'@ionic-native/file'"; let replaceWith = "'@ionic-native/file/ngx'";

for(let filePath of filePaths) { let lang = fs.readFileSync(filePath, "utf8"); lang = lang.replace(replace, replaceWith); fs.writeFileSync(filePath, lang, "utf8") }

console.log("Done!")

`