Erro ao executar aplicativo em ionic 5 | Fórum | School of Net

Deseja poder participar de nosso fórum e tirar todas as suas dúvidas?
Clique aqui e assine nosso plano de acesso ilimitado. Saiba mais.

por carlos eduardo

1 ano, 7 meses atrás carlos eduardo

Erro ao executar aplicativo em ionic 5

Olá pessoal estou com dificuldade para fazer o push notification. no codigo não apresenta erro mas quando vou compilar o mesmo retorna um erro pesquisei uma solução mas não encontrei, se puderem me ajudar fico agradecido. ``` Este e o app.modules import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouteReuseStrategy } from '@angular/router'; import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app-routing.module'; import { Platform } from '@ionic/angular'; import { StatusBar } from '@ionic-native/status-bar/ngx'; import { SplashScreen } from '@ionic-native/splash-screen/ngx'; import { OneSignal } from '@ionic-native/onesignal/ngx'; @NgModule({ declarations: [AppComponent], entryComponents: [], imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule], providers: [ Platform, StatusBar, SplashScreen, OneSignal, { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }], bootstrap: [AppComponent], }) export class AppModule {} Este é o appComponentes import { Component } from '@angular/core'; import { Platform } from '@ionic/angular'; import { StatusBar } from '@ionic-native/status-bar/ngx'; import { SplashScreen } from '@ionic-native/splash-screen/ngx'; import { OneSignal } from '@ionic-native/onesignal/ngx'; @Component({ selector: 'app-root', templateUrl: 'app.component.html', styleUrls: ['app.component.scss'], }) export class AppComponent { public appPages = [ { title: 'Inbox', url: '/folder/Inbox', icon: 'mail' }, { title: 'Outbox', url: '/folder/Outbox', icon: 'paper-plane' }, { title: 'Favorites', url: '/folder/Favorites', icon: 'heart' }, { title: 'Archived', url: '/folder/Archived', icon: 'archive' }, { title: 'Trash', url: '/folder/Trash', icon: 'trash' }, { title: 'Spam', url: '/folder/Spam', icon: 'warning' }, ]; public labels = ['Family', 'Friends', 'Notes', 'Work', 'Travel', 'Reminders']; constructor( public platform: Platform, private statusBar: StatusBar, private splashScreen: SplashScreen, private oneSignal: OneSignal) { this.platform.ready().then(() => { // Okay, so the platform is ready and our plugins are available. // Here you can do any higher level native things you might need. this.oneSignal.startInit('b9dc8250-f317-4811-b39c-752a6a1ac923', '37488757505'); this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.InAppAlert); this.oneSignal.handleNotificationReceived().subscribe((ret) => { console.log(ret) }); this.oneSignal.handleNotificationOpened().subscribe((retOp) => { // do something when a notification is opened console.log(retOp) }); this.oneSignal.endInit(); this.statusBar.styleDefault(); this.splashScreen.hide(); }); } } este é o erro retonado no console An error occurred during the build: Error: The target entry-point "@ionic-native/status-bar" has missing dependencies: - @ionic-native/core at TargetedEntryPointFinder.findEntryPoints (C:\ionic\appPush\node_modules\@angular\compiler-cli\ngcc\src\entry_point_finder\targeted_entry_point_finder.js:40:23) at C:\ionic\appPush\node_modules\@angular\compiler-cli\ngcc\src\execution\analyze_entry_points.js:29:41 at SingleProcessExecutorSync.SingleProcessorExecutorBase.doExecute (C:\ionic\appPush\node_modules\@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:28:29) at C:\ionic\appPush\node_modules\@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:57:59 at SyncLocker.lock (C:\ionic\appPush\node_modules\@angular\compiler-cli\ngcc\src\locking\sync_locker.js:34:24) at SingleProcessExecutorSync.execute (C:\ionic\appPush\node_modules\@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:57:27) at Object.mainNgcc (C:\ionic\appPush\node_modules\@angular\compiler-cli\ngcc\src\main.js:74:25) at Object.process (C:\ionic\appPush\node_modules\@angular\compiler-cli\ngcc\index.js:29:23) at NgccProcessor.processModule (C:\ionic\appPush\node_modules\@ngtools\webpack\src\ngcc_processor.js:163:16) at C:\ionic\appPush\node_modules\@ngtools\webpack\src\ivy\host.js:109:18 at C:\ionic\appPush\node_modules\@ngtools\webpack\src\ivy\host.js:39:24 at Array.map (<anonymous>) at Object.host.resolveModuleNames (C:\ionic\appPush\node_modules\@ngtools\webpack\src\ivy\host.js:37:32) at actualResolveModuleNamesWorker (C:\ionic\appPush\node_modules\typescript\lib\typescript.js:102904:133) at resolveModuleNamesWorker (C:\ionic\appPush\node_modules\typescript\lib\typescript.js:103126:26) at resolveModuleNamesReusingOldState (C:\ionic\appPush\node_modules\typescript\lib\typescript.js:103200:24) An unhandled exception occurred: The target entry-point "@ionic-native/status-bar" has missing dependencies: - @ionic-native/core See "C:\Users\wolfx\AppData\Local\Temp\ng-NGllHr\angular-errors.log" for further details. [ERROR] An error occurred while running subprocess ng. ```

2 Respostas