You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
I can not use ionic-image-loader in ionic 5 over #283
ionic-angular plugin updated to @ionic/angular.
So i can not use this ionic-image-loader plugin.
I have replace import { } from 'ionic-angular' to '@ionic/angular' in node module.
But this is not good way. And then that made many errors.
So ionic-image-loader plugin version need to update, in my opinion
After I have replace ionic-angular to @ionic/angular, i have got error.
Here is error;
Uncaught Error: Can't resolve all parameters for ImageLoader: ([object Object], ?, [object Object], [object Object]).
at syntaxError (vendor-es2015.js:12780)
at CompileMetadataResolver._getDependenciesMetadata (vendor-es2015.js:30771)
at CompileMetadataResolver._getTypeMetadata (vendor-es2015.js:30666)
at CompileMetadataResolver._getInjectableTypeMetadata (vendor-es2015.js:30884)
at CompileMetadataResolver.getProviderMetadata (vendor-es2015.js:30893)
at providers.forEach (vendor-es2015.js:30831)
at Array.forEach ()
at CompileMetadataResolver._getProvidersMetadata (vendor-es2015.js:30791)
at flattenAndDedupeArray.forEach (vendor-es2015.js:30422)
at Array.forEach ()
I could not manage to make it work either.. I believe it is not working for Ionic 5. Can someone please confirm?
I'm not from the team who developed this package but I can confirm that is not working on Ionic 5. Since what I see the author has this repo abandoned I cloned it and tried to update the dependencies to make it compatible with angular 9 and ionic 5 but there are a lot of deprecations and breaking changes between versions.
The last angular stable version that this package supports is Angular 5. Starting to Angular 6 and above you will start getting warning and errors about deprecations or references not found in the packages.
Hope at least give you some idea about the status of the project. Maybe if there's someone who has a lot of time to migrate it to support the latest Angular and Ionic version this repo could back to live again.
Reacted by benzata, michalsisak, Filipe Madureira and Richard095
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")
}
Activity
[-]I can not use in ionic 5 over[/-][+]I can not use ionic-image-loader in ionic 5 over [/+]tinycoding5 commentedon Apr 21, 2020
After I have replace ionic-angular to @ionic/angular, i have got error.
Here is error;
Uncaught Error: Can't resolve all parameters for ImageLoader: ([object Object], ?, [object Object], [object Object]).
at syntaxError (vendor-es2015.js:12780)
at CompileMetadataResolver._getDependenciesMetadata (vendor-es2015.js:30771)
at CompileMetadataResolver._getTypeMetadata (vendor-es2015.js:30666)
at CompileMetadataResolver._getInjectableTypeMetadata (vendor-es2015.js:30884)
at CompileMetadataResolver.getProviderMetadata (vendor-es2015.js:30893)
at providers.forEach (vendor-es2015.js:30831)
at Array.forEach ()
at CompileMetadataResolver._getProvidersMetadata (vendor-es2015.js:30791)
at flattenAndDedupeArray.forEach (vendor-es2015.js:30422)
at Array.forEach ()
How can I solve this issue?
benzata commentedon Apr 23, 2020
I could not manage to make it work either.. I believe it is not working for Ionic 5. Can someone please confirm?
ernes128 commentedon Apr 30, 2020
I'm not from the team who developed this package but I can confirm that is not working on Ionic 5. Since what I see the author has this repo abandoned I cloned it and tried to update the dependencies to make it compatible with angular 9 and ionic 5 but there are a lot of deprecations and breaking changes between versions.
The last angular stable version that this package supports is Angular 5. Starting to Angular 6 and above you will start getting warning and errors about deprecations or references not found in the packages.
Hope at least give you some idea about the status of the project. Maybe if there's someone who has a lot of time to migrate it to support the latest Angular and Ionic version this repo could back to live again.
lestrell commentedon Jun 26, 2020
Hi @ernes128,
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!")
`