cordova - Error when executing an ionic 2 Android app on prod mode , cannot find module ngfactory -
we having error when executing , ionic2 app using --prod flag
and screen gets white after splashscreen load.
the command launching :
ionic run android --prod
we using device deployment, nexus 5x (the same behaviour emulators)
ionic info:
apache cordova 6.4.0 ionic framework version: 2.1.0 ionic cli version: 2.2.1 ionic app lib version: 2.2.0 ionic app scripts version: 1.2.0 ios-deploy version: not installed ios-sim version: not installed os: windows 7 node version: v6.5.0 xcode version: not installed
cordova plugins:
those our dependencies on package.json:
"dependencies": { "@angular/common": "2.1.1", "@angular/compiler": "2.1.1", "@angular/compiler-cli": "2.1.1", "@angular/core": "2.1.1", "@angular/forms": "2.1.1", "@angular/http": "2.1.1", "@angular/platform-browser": "2.1.1", "@angular/platform-browser-dynamic": "2.1.1", "@angular/platform-server": "2.1.1", "@ionic/storage": "1.1.6", "angular2-google-maps": "0.16.0", "ionic-angular": "2.1.0", "ionic-native": "2.5.1", "ionicons": "3.0.0", "localforage": "1.4.3", "localforage-cordovasqlitedriver": "1.5.0", "rxjs": "5.0.0-beta.12", "saml2-js": "1.11.0", "tslint": "4.0.0", "zone.js": "0.6.26" }
and our devdependencies:
"devdependencies": { "@ionic/app-scripts": "^1.2.2", "@types/jasmine": "2.5.38", "@types/node": "7.0.4", "angular-cli": "1.0.0-beta.21", "codelyzer": "2.0.0-beta.1", "electron": "1.4.12", "electron-builder": "11.2.3", "electron-packager": "8.5.0", "jasmine-core": "2.5.2", "karma": "1.3.0", "karma-chrome-launcher": "2.0.0", "karma-cli": "1.0.1", "karma-jasmine": "1.0.2", "karma-mocha-reporter": "2.2.1", "karma-remap-istanbul": "0.2.1", "sw-toolbox": "3.5.1", "typescript": "^2.0.9" }
tsconfig.json content:
{ "compileroptions": { "allowsyntheticdefaultimports": true, "declaration": false, "emitdecoratormetadata": true, "experimentaldecorators": true, "lib": [ "dom", "es6" ], "module": "es2015", "moduleresolution": "node", "sourcemap": true, "target": "es5", "baseurl": ".", "paths": { "@app/*": [ "src/*" ] }, "types": [ "node" ] }, "include": [ "src/**/*.ts" ], "exclude": [ "node_modules" ], "compileonsave": false, "atom": { "rewritetsconfig": false } }
as can see, have updated ionic-script latests , check if problem has solved, no luck.
with same stack , 1.2.0 version of @ionic/app-scripts, seems ngfactory files generated, have error (at runtime):
zoom:
we saw on github issue regarding error, bug fixed recommending update 1.2.1 version, , again appeared error of "cannot find module ..ngfactory"
https://forum.ionicframework.com/t/error-after-updating-app-scripts-to-1-2-0/84207
https://github.com/driftyco/ionic-app-scripts/issues/836
any idea of why aren't ngfactory files being generated inside bundle versions?
any should appreciated, latests step put awesome , complete app in production, reduce load time @ beggining. in advance inestimable help.
regards
remove "^
" sign before "typescript
" , "@ionic/app-scripts
" packages in package.json. should below:
"typescript": "2.0.9", "@ionic/app-scripts": "1.2.2"
run npm install
, try again.
Comments
Post a Comment