Property 'firebase' does not exist on type { production: boolean; }

前端 未结 5 1021
心在旅途
心在旅途 2020-12-24 04:11

So I was trying to build and deploy my Angular 4 app for production on both Firebase and Heroku, but I have come across the error as follows:

ERROR in /U

5条回答
  •  庸人自扰
    2020-12-24 05:14

    I hate duplicates in code
    so let's create a separate file named environments/firebase.ts with content

    export const firebase = {
        //...
    };
    

    the usage

    import {firebase} from '../environments/firebase';
    //...
    AngularFireModule.initializeApp(firebase)
    

    all is clear as for me

提交回复
热议问题