ionic-audio icon indicating copy to clipboard operation
ionic-audio copied to clipboard

ERROR in Error during template compile of 'IonicAudioModule'

Open StefaniToto opened this issue 4 years ago • 0 comments

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';

StefaniToto avatar Dec 13 '20 21:12 StefaniToto