Build failed on Ionic Pro


#1

This my log with error:

[16:34:28] typescript: src/app/app.component.ts,
line: 14 Cannot find module ‘…/pages/promo/promo’.

but in src/app/app.component.ts there is “import { PromoPage } from ‘…/pages/promo/promo’;” ed this link is correct

and this my app.modules.ts:
import { BrowserModule } from ‘@angular/platform-browser’;
import { ErrorHandler, NgModule } from ‘@angular/core’;
import { IonicApp, IonicErrorHandler, IonicModule } from ‘ionic-angular’;
import { HttpClientModule } from ‘@angular/common/http’;
import { IonicStorageModule } from ‘@ionic/storage’;

import { MyApp } from ‘./app.component’;
import { HomePage } from ‘…/pages/home/home’;
import { ListPage } from ‘…/pages/list/list’;
import { ContattiPage } from ‘…/pages/contatti/contatti’;
import { PresentazionePage } from ‘…/pages/presentazione/presentazione’;
import { LoginPage } from ‘…/pages/login/login’;
import { NewsPage } from ‘…/pages/news/news’;
import { AutoPage } from ‘…/pages/auto/auto’;
import { ProfiloPage } from ‘…/pages/profilo/profilo’;
import { EsciPage } from ‘…/pages/esci/esci’;
import { PromoPage } from ‘…/pages/promo/promo’;
import { VoucherPage } from ‘…/pages/voucher/voucher’;

import { StatusBar } from ‘@ionic-native/status-bar’;
import { SplashScreen } from ‘@ionic-native/splash-screen’;
import { Contacts } from ‘@ionic-native/contacts’;
import { CallNumber } from ‘@ionic-native/call-number’;
import { EmailComposer } from ‘@ionic-native/email-composer’;
import { GoogleAnalytics } from ‘@ionic-native/google-analytics’;

import { RestNewsProvider } from ‘…/providers/rest-news/rest-news’;
import { RestListaautoProvider } from ‘…/providers/rest-listaauto/rest-listaauto’;
import { RestListapromoProvider } from ‘…/providers/rest-listapromo/rest-listapromo’;

@NgModule({
declarations: [
MyApp,
HomePage,
ListPage,
ContattiPage,
PresentazionePage,
LoginPage,
NewsPage,
AutoPage,
ProfiloPage,
EsciPage,
PromoPage,
VoucherPage
],
imports: [
BrowserModule,
HttpClientModule,
IonicModule.forRoot(MyApp),
IonicStorageModule.forRoot(),
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
ListPage,
ContattiPage,
PresentazionePage,
LoginPage,
NewsPage,
AutoPage,
ProfiloPage,
EsciPage,
PromoPage,
VoucherPage
],
providers: [
StatusBar,
SplashScreen,
Contacts,
CallNumber,
EmailComposer,
GoogleAnalytics,
{provide: ErrorHandler, useClass: IonicErrorHandler},
RestNewsProvider,
RestListaautoProvider,
RestListapromoProvider
]
})
export class AppModule {}

In local testing with “ionic serve” all works but when commit on Ionic Pro => Build failed :sob:

Can you help me?


#2

This was a problem with git.

Before I used git add -p
Use git add -A y to resolve this problem