gpt4 book ai didi

firebase - 错误 TS2339 : Property 'firebaseConfig' does not exist on type '{ production: boolean; }'

转载 作者:行者123 更新时间:2023-12-03 06:50:46 25 4
gpt4 key购买 nike

部署代码时出现此错误。

ERROR in src/app/app.module.ts(26,49): error TS2339: Property 'firebaseConfig' does not exist on type '{ production: boolean; }'.

App.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AngularFireModule } from 'angularfire2';
import { AngularFireDatabaseModule } from 'angularfire2/database';
import { FormsModule } from '@angular/forms';


import { AppComponent } from './app.component';
import { environment } from '../environments/environment';
import { ContactsComponent } from './contacts/contacts.component';
import { ContactComponent } from './contacts/contact/contact.component';
import { ContactListComponent } from './contacts/contact-list/contact-list.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ToastrModule } from 'ngx-toastr';


@NgModule({
declarations: [
AppComponent,
ContactsComponent,
ContactComponent,
ContactListComponent
],
imports: [
BrowserModule,
AngularFireModule.initializeApp(environment.firebaseConfig),
AngularFireDatabaseModule,
FormsModule,
BrowserModule,
BrowserAnimationsModule,
ToastrModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

谁能帮帮我。

这是我的环境配置导出常量环境= {
生产:假的,
火力库配置:{
apiKey: "AIzaSyAyVk7gK3ZL8RJ1vDuMm5pwJKDTJKQZbZ0",
authDomain:“contactlist-163b0.firebaseapp.com”,
数据库URL:“https://contactlist-163b0.firebaseio.com”,
项目ID:“contactlist-163b0”,
存储桶: "",
消息发件人 ID:“593204922920”
}
};

最佳答案

您还需要在“environment.prod.ts”文件中添加“firebaseConfig”配置。

关于firebase - 错误 TS2339 : Property 'firebaseConfig' does not exist on type '{ production: boolean; }' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49252611/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com