I've been working on integrating Firebase phone authentication into an older Ionic project and have followed several tutorials. I was able to successfully implement it, but whenever I run ionic serve -l
, I encounter the following error:
Interestingly, I discovered that if I comment out one of the lines in app.modules.ts
before running ionic serve -l
, the errors disappear:
import { AngularFireModule } from "@angular/fire";
import { AngularFireAuth } from "@angular/fire/auth";
Despite trying various solutions suggested online, such as removing the node_modules folder and testing on a different PC, I have yet to resolve this issue.
Error Message:
Typescript Error
';' expected.
gtagName?: string;
/** Sets custom name for `dataLayer` array used by gtag. */
dataLayerName?:string;
Typescript Error
'EventNameString' only refers to a type, but is being used as a value here.
/** Sets custom name for `dataLayer` array used by gtag. */
dataLayerName?:string;
Typescript Error
'never' only refers to a type, but is being used as a value here.
/** Sets custom name for `dataLayer` array used by gtag. */
dataLayerName?:string;
Typescript Error
Cannot find name 'T'.
/** Sets custom name for `dataLayer` array used by gtag. */
dataLayerName?:string;
ionic info :
Ionic Framework: ^3.9.8
Ionic App Scripts: 3.2.4
Angular Core: ^5.2.7
Angular Compiler CLI: ^5.2.7
Node: 12.13.1
OS Platform: Windows 10
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36
app.modules.ts
imported dependencies:
import { ErrorHandler, Injectable, Injector, NgModule } from "@angular/core";
import { IonicApp, IonicErrorHandler, IonicModule } from "ionic-angular";
import { BrowserModule } from "@angular/platform-browser";
import { HttpModule } from "@angular/http";
import { HttpClient, HttpClientModule } from "@angular/common/http";
import { Geolocation } from "@ionic-native/geolocation";
import { NativeGeocoder } from "@ionic-native/native-geocoder";
import { MyApp } from "./app.component";
import { TabsPage } from "../pages/tabs/tabs";
import { Loading } from "../pages/loading/loading";
import { Welcome } from "../pages/welcome/welcome";
import { GeoPage } from "../pages/geo/geo";
import { IonicStorageModule } from "@ionic/storage";
import { StatusBar } from "@ionic-native/status-bar";
import { SplashScreen } from "@ionic-native/splash-screen";
import { APIService } from "../services/api_service";
import { CartService } from "../services/cart_service";
import { PushService } from "../services/push_service";
import { UtilService } from "../services/util_service";
import { OrderHistoryService } from "../services/order_history_service";
import { TranslateLoader, TranslateModule } from "@ngx-translate/core";
import { TranslateHttpLoader } from "@ngx-translate/http-loader";
import { RestaurantsPageModule } from "../pages/catalog/restaurants/restaurants.module";
import { GeoPageModule } from "../pages/geo/geo.module";
import { AngularFireModule } from "@angular/fire";
import { AngularFireAuth } from "@angular/fire/auth";
import { firebaseConfig } from "../config";
import { LoginPage } from "../pages/personal/login/login";
import { AuthService } from "../services/auth.service";
import { NgxErrorsModule } from '@ultimate/ngxerrors';