Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[firebase-core]: Unable to Initialize Firebase App

Đang mở
#154 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
20/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
angular, firebase, typescript
Lĩnh vực
backend, mobile

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện quá trình khởi tạo từ src/app/app.component.ts và kiểm tra đường dẫn Firebase.initializeApp đang bị lỗi trong node_modules/@nativescript/firebase-core/index.android.js, đặc biệt là quyền truy cập FirebaseApp được báo cáo. Kiểm tra thiết lập NativeScript và Firebase của dự án trước khi truy vết lỗi riêng của Android. Hoàn tất khi ứng dụng khởi tạo thành công mà không có lỗi undefined FirebaseApp được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hello Team,
Can you assist with the error below, when trying to initialize the firebase app from the firebase-core?
Here is how I am initializing it

export class AppComponent implements OnInit {

    ngOnInit(): void {
        firebase().initializeApp().then((app) => {
            console.log(app);
        })
    }

}

Here is the error that shows up

JS: Error: Cannot read property 'FirebaseApp' of undefined
JS:     at file: src/webpack:/testapp/node_modules/@nativescript/firebase-core/index.android.js:295:0
JS:     at new ZoneAwarePromise (file: src/webpack:/testapp/node_modules/zone.js/fesm2015/zone.js:1429:0)
JS:     at Firebase.initializeApp (file: src/webpack:/testapp/node_modules/@nativescript/firebase-core/index.android.js:234:0)
JS:     at AppComponent.ngOnInit (file: src/webpack:/testapp/src/app/app.component.ts:6:16)
JS:     at callHook (file: src/webpack:/testapp/node_modules/@angular/core/fesm2015/core.mjs:2491:0)
JS:     at callHooks (file: src/webpack:/testapp/node_modules/@angular/core/fesm2015/core.mjs:2460:0)
JS:     at executeInitAndCheckHooks (file: src/webpack:/testapp/node_modules/@angular/core/fesm2015/core.mjs:2411:0)
JS:     at refreshView (file: src/webpack:/testapp/node_modules/@angular/core/fesm2015/core.mjs:11971:0)
JS:     at detectChangesInternal (file: src/webpack:/testapp/node_modules/@angular/core/fesm2015/core.mjs:13174:0)
JS:     at RootViewRef.detectChanges (file:///data/data/org.nativescript.testapp/fi...
Ngôn ngữ chính
TypeScript
Star
62
Fork
53
Merge trung bình
8 ngày 4 giờ
Pull request đã merge (30 ngày)
2

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NativeScript/firebase

Tất cả issue của NativeScript/firebase

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.