Closed rdai closed 6 years ago
@rdai I am not sure what's wrong with your environment. I am able to build with --prod
with 3.2.2.
Can you run ionic info and paste the results?
Thank you for the quick reply. Here is my Ionic info.
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.0.1
Cordova Platforms : android 7.0.0 ios 4.5.3
Ionic Framework : ionic-angular 3.8.0
System:
Node : v8.3.0
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : /usr/local/Cellar/android-sdk/24.4.1/
Misc:
backend : pro
You should update your project to Ionic 3.9.2. That will also update your app-scripts and typescript libraries. Check the ionic changelog for the upgrade instructions.
Ok, I tried it after 3.9.2, still the same thing, works when I did "npm install --save ionic-audio@3.2.0", breaks as soon as I did "npm install --save ionic-audio@3.2.2".
I certainly don't expect you to fix an issue on my end if it works for you.
Thank you for your help!
@rdai One more thing, have you also updated your @ionic/app-scripts
package?
I just updated it after your message, still no good, my iconic info now 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) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 6.3.0 ios 4.5.3
Ionic Framework : ionic-angular 3.9.2
System:
Node : v8.3.0
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : /usr/local/Cellar/android-sdk/24.4.1/
Misc:
backend : pro`
Thanks again, no worries.
I ran out of ideas 😃
I have good news! I realized the problem is 3.2.2 is on Angular 5 and since I started the project last year, my Angular is still 4. Efforts to upgrade the existing project has not been successful so instead of putting new wine in the old wineskin, I just started a brand new project and noticed the Angular is automatically set to 5, installed 3.2.2 and copy/pasted some of my code and it is working just fine! So it definitely was my environment and not your code.
Luckily your plugin is the central piece of what I am building so I should be able to migrate the rest with little effort and have myself a working app.
Just FYI. Thanks!
Hi,
I am learning Ionic so if I missed something obvious please excuse me.
Per this ticket: https://github.com/arielfaur/ionic-audio/issues/159
After updating the plugin to 3.2.2, while the problem of repeating onTrackFinished was fixed, when running "ionic cordova build android --prod"
I get this error:
Error: Metadata version mismatch for module /Applications/MAMP/htdocs/myapp/node_modules/ionic-audio/dist/ionic-audio-interfaces.d.ts, found version 4, expected 3 at StaticSymbolResolver.getModuleMetadata (/Applications/MAMP/htdocs/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:25755:34) at StaticSymbolResolver._createSymbolsOf (/Applications/MAMP/htdocs/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:25543:46) at StaticSymbolResolver.getSymbolsOf (/Applications/MAMP/htdocs/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:25524:14) at /Applications/MAMP/htdocs/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:24381:30 at Array.forEach (<anonymous>) at extractProgramSymbols (/Applications/MAMP/htdocs/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:24380:79) at AotCompiler.analyzeModulesAsync (/Applications/MAMP/htdocs/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:23936:47) at CodeGenerator.codegen (/Applications/MAMP/htdocs/myapp/node_modules/@angular/compiler-cli/src/codegen.js:32:14) at Function.NgTools_InternalApi_NG_2.codeGen (/Applications/MAMP/htdocs/myapp/node_modules/@angular/compiler-cli/src/ngtools_api.js:73:30) at Object.doCodegen (/Applications/MAMP/htdocs/myapp/node_modules/@ionic/app-scripts/dist/aot/codegen.js:6:51)
My search shows it has to do with dependencies and package.json.
Is this something wrong with my environment setup or something in 3.2.2? I restored an backup and the issue don't seem to exist with 3.2.0.