2021年1月5日星期二

Getting errors when starting an ionic project for the first time

I cloned an ionic project online that works for others, but when I do an ionic serve, I get the below errors. The site says it that it started up, but there are tons of errors in the log, and going to the site just shows those same errors.

I have node 10.16.0, and it's using an Angular 5.2.0 codebase and Ionic. I ran the command of sudo npm install -g cordova@8.0.0 ionic@4.0.1 which I think was needed as well.

And looking at package.json, I see "angularfire2": "5.3.0"

ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser  [app-scripts] [19:39:42]  ionic-app-scripts 3.2.4   [app-scripts] [19:39:42]  watch started ...   [app-scripts] [19:39:42]  build dev started ...   [app-scripts] [19:39:42]  clean started ...   [app-scripts] [19:39:42]  clean finished in 1 ms   [app-scripts] [19:39:42]  copy started ...   [app-scripts] [19:39:42]  deeplinks started ...   [app-scripts] [19:39:42]  deeplinks finished in 242 ms   [app-scripts] [19:39:42]  transpile started ...   [app-scripts] [19:39:50]  typescript: node_modules/@angular/fire/auth/auth.d.ts, line: 8   [app-scripts]             Cannot find name 'User'.   [app-scripts]        L7:  readonly auth: FirebaseAuth;  [app-scripts]        L8:  readonly authState: Observable<User | null>;  [app-scripts]        L9:  readonly idToken: Observable<string | null>;  [app-scripts] [19:39:50]  typescript: node_modules/@angular/fire/auth/auth.d.ts, line: 10   [app-scripts]             Cannot find name 'User'.   [app-scripts]        L9:  readonly idToken: Observable<string | null>;  [app-scripts]       L10:  readonly user: Observable<User | null>;  [app-scripts]       L11:  readonly idTokenResult: Observable<auth.IdTokenResult | null>;  [app-scripts]             Namespace ''*'' has no exported member 'IdTokenResult'.   [app-scripts] [19:39:50]  typescript: node_modules/@angular/fire/auth/auth.d.ts, line: 11  [7:49 PM]  [app-scripts]       L10:  readonly user: Observable<User | null>;  [app-scripts]       L11:  readonly idTokenResult: Observable<auth.IdTokenResult | null>;  [app-scripts]       L12:  constructor(options: FirebaseOptions, nameOrConfig: string | FirebaseAppConfig | null | undefined, platformId: Object, zone: NgZone);  [app-scripts]             Namespace '''' has no exported member 'Database'.   [app-scripts] [19:39:50]  typescript: node_modules/@angular/fire/firebase.app.module.d.ts, line: 13   [app-scripts] [19:39:50]  typescript: node_modules/@angular/fire/firebase.app.module.d.ts, line: 14   [app-scripts] [19:39:50]  typescript: node_modules/@angular/fire/firebase.app.module.d.ts, line: 16   [app-scripts] [19:39:50]  typescript: node_modules/@angular/fire/firebase.app.module.d.ts, line: 18   [app-scripts]       L12:  export declare const FIREBASE_APP_NAME: InjectionToken<string | FirebaseAppConfig | undefined>;  [app-scripts]       L13:  export declare type FirebaseDatabase = database.Database;  [app-scripts]       L14:  export declare type FirebaseAuth = auth.Auth;  [app-scripts]             Namespace '''' has no exported member 'Auth'.   [app-scripts]       L13:  export declare type FirebaseDatabase = database.Database;  [app-scripts]       L14:  export declare type FirebaseAuth = auth.Auth;  [app-scripts]       L15:  export declare type FirebaseAnalytics = any;  [app-scripts]             Namespace '''' has no exported member 'Messaging'.   [app-scripts]       L15:  export declare type FirebaseAnalytics = any;  [app-scripts]       L16:  export declare type FirebaseMessaging = messaging.Messaging;  [app-scripts]       L17:  export declare type FirebasePerformance = any;  [app-scripts]             Namespace '''' has no exported member 'Storage'.   [app-scripts]       L17:  export declare type FirebasePerformance = any;  [7:49 PM]  [app-scripts]       L18:  export declare type FirebaseStorage = storage.Storage;  [app-scripts]       L19:  export declare type FirebaseFirestore = firestore.Firestore;  [app-scripts]             Namespace '''' has no exported member 'Firestore'.   [app-scripts]       L18:  export declare type FirebaseStorage = storage.Storage;  [app-scripts]       L19:  export declare type FirebaseFirestore = firestore.Firestore;  [app-scripts]       L20:  export declare type FirebaseFunctions = functions.Functions;  [app-scripts]             Namespace '''' has no exported member 'Functions'.   [app-scripts]       L19:  export declare type FirebaseFirestore = firestore.Firestore;  [app-scripts]       L20:  export declare type FirebaseFunctions = functions.Functions;  [app-scripts]       L21:  export declare type FirebaseRemoteConfig = any;  [app-scripts]             Namespace ''*'' has no exported member 'auth'.   [app-scripts]       L13:  // firebase auth - google - Create an instance of the Google provider object:  [app-scripts]       L14:  let googleProvider: firebase.auth.GoogleAuthProvider = new firebase.auth.GoogleAuthProvider();  [app-scripts]       L15:  // let twitterProvider: firebase.auth.TwitterAuthProvider = new firebase.auth.TwitterAuthProvider();  [app-scripts] [19:39:50]  typescript: node_modules/@angular/fire/firebase.app.module.d.ts, line: 19   [app-scripts] [19:39:50]  typescript: node_modules/@angular/fire/firebase.app.module.d.ts, line: 20   [app-scripts] [19:39:50]  typescript: src/pages/signup/signup.ts, line: 14  [7:50 PM]  [INFO] Development server running!           Local: http://localhost:8100/         External: http://192.168.86.61:8100/         DevApp: my0site@8100 on imac.lan           Use Ctrl+C to quit this process    [INFO] Browser window opened to http://localhost/:8100!    [app-scripts] [19:39:50]  copy finished in 8.68 s   [app-scripts] [19:39:51]  watch ready in 9.22 s  
https://stackoverflow.com/questions/65589222/getting-errors-when-starting-an-ionic-project-for-the-first-time January 06, 2021 at 10:05AM

没有评论:

发表评论