arielfaur / ionic-audio

An audio player for Ionic 3 and Angular 4. Works with HTML 5 audio or native audio using Cordova Media plugin.
http://arielfaur.github.io/ionic-audio/2.0/index.html
MIT License
321 stars 163 forks source link

ERROR in Error during template compile of 'IonicAudioModule' #216

Open StefaniToto opened 3 years ago

StefaniToto commented 3 years ago

Im using Ionic 5 and during buliding its coming an error:

ionic build --prod --verbose

ERROR in Error during template compile of 'IonicAudioModule' Could not resolve ionic-angular relative to [object Object].. [ERROR] An error occurred while running subprocess ng. ng.cmd run app:build:production --verbose exited with exit code 1.

During ionic serve everything is working fine. No issues.

My module.ts.

@NgModule({ imports: [ CommonModule, FormsModule, IonicModule, AudioPageRoutingModule, IonicAudioModule.forRoot(defaultAudioProviderFactory),

], declarations: [AudioPage ], providers: [ { provide: AudioProvider, useFactory: myCustomAudioProviderFactory } ] }) export class AudioPageModule {}

export function myCustomAudioProviderFactory() { return (window.hasOwnProperty('cordova')) ? new CordovaMediaProvider() : new WebAudioProvider(); }

Also at ionic-audio.module.js has made a change import { IonicModule } from '@ionic/angular';