Closed daniele-sartiano closed 7 years ago
how does your tsconfig.json looks like?
did you do a ionic state reset
, if not try this if it fixes your error?
also paste the exact error from the console.
Here my tsconfig.json:
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
],
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5"
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
Yeah, with ionic state reset
I had the same issue.
In the following image you can see that LocalNotifications plugin and Push plugin are not installed on the device:
And here the output of the compilation: error.txt
please provide error showing on terminal
@yasar-salim in my previous comment there is the file error.txt with the log of the terminal. Can you see it?
Fixed. The problem was that I was using the plugins in the constructor of my providers, before the event "platform.ready", so the solution is to use the plugins after the platform.ready event.
@daniele-sartiano what?
Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/ http://ionicworldwide.herokuapp.com/
Short description of the problem:
When I use the --prod flag, the building system don't add the cordova plugins. I have not error during the compilation of the apk.
What behavior are you expecting?
I'm expecting to use the cordova plugin also in prod mode.
Steps to reproduce:
[15:37:09] ionic-app-scripts 1.0.0 [15:37:09] build prod started ... [15:37:09] clean started ... [15:37:09] clean finished in 8 ms [15:37:09] copy started ... [15:37:09] ngc started ... [15:37:33] ngc finished in 24.43 s [15:37:33] webpack started ... [15:37:34] copy finished in 25.04 s [15:37:43] webpack finished in 9.55 s [15:37:43] uglifyjs started ... [15:37:43] sass started ... [15:37:46] sass finished in 2.91 s [15:37:46] cleancss started ... [15:37:49] cleancss finished in 3.60 s [15:37:58] uglifyjs finished in 15.29 s [15:37:58] build prod finished in 49.37 s Running command: "C:\Program Files\nodejs\node.exe" C:\projects\biocare\alfa\IonicNearU\hooks\after_prepare\010_add_plat form_class.js C:\projects\biocare\alfa\IonicNearU ....
My package.json is:
Which @ionic/app-scripts version are you using? $ ionic info
Your system information:
ordova CLI: 6.4.0 Ionic Framework Version: 2.0.0-rc.4 Ionic CLI Version: 2.1.13 Ionic App Lib Version: 2.1.7 Ionic App Scripts Version: 1.0.0 ios-deploy version: Not installed ios-sim version: Not installed OS: Windows 10 Node Version: v5.0.0 Xcode version: Not installed
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
I reproduced the issue on Windows and Ubuntu. Without the --prod flag I have not problems with the plugins.