Production build failing
"dependencies": {
"@agm/core": "^1.0.0-beta.2",
"@angular/cli": "^1.6.4",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/compiler-cli": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/tsc-wrapped": "^4.4.6",
"@ionic-native/camera": "^4.4.2",
"@ionic-native/core": "^4.4.2",
"@ionic-native/device": "^4.5.2",
"@ionic-native/file": "^4.4.2",
"@ionic-native/file-path": "^4.5.2",
"@ionic-native/file-transfer": "^4.4.2",
"@ionic-native/google-maps": "4.4.2",
"@ionic-native/image-picker": "^4.4.2",
"@ionic-native/push": "^4.5.2",
"@ionic-native/splash-screen": "^4.5.2",
"@ionic-native/status-bar": "4.4.2",
"@ionic-native/transfer": "^3.14.0",
"@ionic/storage": "^2.1.3",
"@ngx-translate/core": "^9.1.1",
"@ngx-translate/http-loader": "0.0.3",
"angular": "^1.6.8",
"autoprefixer": "^7.2.5",
"cordova-android": "6.3.0",
"cordova-browser": "5.0.3",
"cordova-ios": "4.5.4",
"cordova-plugin-camera": "^2.4.1",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-console": "^1.1.0",
"cordova-plugin-device": "^1.1.7",
"cordova-plugin-file": "^4.3.3",
"cordova-plugin-filepath": "^1.0.2",
"cordova-plugin-splashscreen": "^4.1.0",
"cordova-plugin-statusbar": "^2.4.1",
"cordova-plugin-telerik-imagepicker": "^2.1.8",
"cordova-plugin-whitelist": "^1.3.1",
"enhanced-resolve": "^3.3.0",
"generate": "0.14.0",
"ionic-angular": "^3.9.2",
"ionic-gallery-modal": "^0.2.7",
"ionic-img-viewer": "^2.7.3",
"ionic-plugin-keyboard": "^2.2.1",
"ionic2-rating": "^1.2.2",
"ionicons": "3.0.0",
"ng2-file-upload": "^1.3.0",
"phonegap-plugin-push": "^1.10.6",
"platform": "1.3.4",
"rxjs": "^5.5.6",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.12"
}
Error:
Cannot determine the module for class ImageViewerComponent in
C:/project/node_modules/ionic-img-viewer/dist/umd/src/image-viewer.component.d.ts! Add
ImageViewerComponent to the NgModule to fix it.
Thats occur only when I try to build with --prod
Same issue for our End Sir
Our Ionic info is:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.2
Cordova Platforms : android 6.3.0 ios 4.5.2
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
ios-sim : 6.1.1
Node : v7.10.0
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Did you guys get any solution for this problem? As i am also facing the same issue while compiling for Android
I have the same problem, is there a solution for this?
Same issue for me also, without --prod its working fine, but for --prod I'm getting Metadata version mismatch for module/node_modules/ionic-img-viewer/dist/es2015/src/module.d.ts, found version 4, expected 3
Hey, it seems that you are not using the right version of the ionic-img-viewer package for you angular version.
Try npm install ionic-img-viewer@latest --save
Same error. Updating package does not help
What's your angular version ? It's probably the other way around in fact, if you have found version 4, expected 3 you should use a lower version. I guess you are using Angular 4.x ?
Hi this error is generated at compilation! ./node_modules/ionic-img-viewer/dist/es2015/src/image-viewer-impl.js Module not found: Error: Can't resolve 'ionic-angular' in 'D:\Mes Projets Ionic\mdc\node_modules\ionic-img-viewer\dist\es2015\src'
Already in my PROBLEMS console I get { "resource": "/d:/Mes Projets Ionic/mdc/node_modules/ionic-img-viewer/tsconfig.json", "owner": "typescript", "severity": 8, "message": "File 'd:/Mes Projets Ionic/mdc/node_modules/ionic-img-viewer/ionic-img-viewer.ts' not found.", "source": "ts", "startLineNumber": 1, "startColumn": 1, "endLineNumber": 1, "endColumn": 2 }
I am using Ionic 4.10.3 Ionic Framework : @ionic/angular 4.0.2 @angular-devkit/build-angular : 0.12.4 @angular-devkit/schematics : 7.2.4 @angular/cli : 7.2.4 @ionic/angular-toolkit : 1.4.0