Freelance Project Requests info@CodeDocu.de Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

Angular Error: NullInjectorError: No provider for AngularFireDatabase!  Code  core.js: 5967

 

 

Error Code  core.js: 5967

Failed to connect Angular Module Firebase

Error message

 

core.js:5967 ERROR NullInjectorError: R3InjectorError(AppModule)[AngularFireDatabase -> AngularFireDatabase -> AngularFireDatabase]:

  NullInjectorError: No provider for AngularFireDatabase!

 

 

 

In the Chrome browser in the Console

 

core.js:5967 ERROR NullInjectorError: R3InjectorError(AppModule)[AngularFireDatabase -> AngularFireDatabase -> AngularFireDatabase]:

  NullInjectorError: No provider for AngularFireDatabase!

    at NullInjector.get (http://localhost:4200/vendor.js:38773:27)

    at R3Injector.get (http://localhost:4200/vendor.js:38940:33)

    at R3Injector.get (http://localhost:4200/vendor.js:38940:33)

    at R3Injector.get (http://localhost:4200/vendor.js:38940:33)

    at NgModuleRef$1.get (http://localhost:4200/vendor.js:52996:33)

    at Object.get (http://localhost:4200/vendor.js:52710:35)

    at lookupTokenUsingModuleInjector (http://localhost:4200/vendor.js:31259:39)

    at getOrCreateInjectable (http://localhost:4200/vendor.js:31371:12)

    at Module.ɵɵdirectiveInject (http://localhost:4200/vendor.js:42378:12)

    at NodeInjectorFactory.AppComponent_Factory [as factory] (http://localhost:4200/main.js:88:150)

 

 

And in addition, in  ng serve local web server is displayed:

 

app.component.ts depends on 'angularfire2/database'.

CommonJS or AMD dependencies can cause optimization bailouts.

For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

 

 

 

 

Warning: D:\Programmierung\Angular\Kurs\dailycheck\src\app\app.component.ts depends on 'angularfire2/database'. CommonJS or AMD dependencies can cause optimization bailouts.

For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

 

Warning: D:\Programmierung\Angular\Kurs\dailycheck\node_modules\@angular\fire\__ivy_ngcc__\es2015\firebase.app.module.js depends on 'firebase/app'. CommonJS or AMD dependencies can cause optimization bailouts.

For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

 

Warning: D:\Programmierung\Angular\Kurs\dailycheck\node_modules\firebase\database\dist\index.esm.js depends on '@firebase/database'. CommonJS or AMD dependencies can cause optimization bailouts.

For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

 

 

Solution:

You have to enter the Angular module in the Angular app.component.ts file in two places

1: in import at the top of the header

import { AngularFireDatabaseModule } from '@angular/fire/database';

And

2: in the @NgModule import area

  imports: [

    BrowserModule,

    AngularFireModule.initializeApp(firebaseConfig), 

    AngularFireDatabaseModule

  ],

 

Mobile
»
Angular Error: NgFor only supports binding to Iterables such as Arrays.
»
Angular Error app.component.html error TS2341: Property var is private and only accessible within class AppComponent
»
Angular Error NullInjectorError No provider for AngularFireDatabase
»
Solved Angular Firebase Fehler TS2305: Module firebase/app has no exported member firestore
»
Angular Error NG8002: Cant bind to ngModel since it isnt a known property of input.
»
Angular Fehler: Error: HostResourceResolver: could not resolve
»
Error message: ng serve The serve command requires to be run in an Angular project
»
Error message: The file cannot be loaded. The file is not digitally signed npm ng.ps1

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de