question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular 8.2.14 No provider for FaConfig

See original GitHub issue

Describe the problem

I’ve follow the procedure describe on the readme to use font awsome and installed all required packages

"@fortawesome/angular-fontawesome": "^0.6.0-alpha.0",
    "@fortawesome/fontawesome-svg-core": "^1.2.25",
    "@fortawesome/free-brands-svg-icons": "^5.11.2",
    "@fortawesome/free-solid-svg-icons": "^5.11.2",

When I’m using ng serve, everything is working well and my icons are present but as soon as I’m using ng serve --prod I’m getting the following error message

  StaticInjectorError(Platform: core)[angular_fontawesome_FaIconComponent -> FaConfig]: 
    NullInjectorError: No provider for FaConfig!```
<!--- What happened? What are you seeing? How did you arrive here? -->
I just open my browser when everything is compile succeful message from angular 
### What did you expect?
No issue en prod mode for NoProvider for FaConfig

### Reproducible test case
Angular CLI: 8.3.20
Node: 10.16.0
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                                    Version
--------------------------------------------------------------------
@angular-devkit/architect                  0.803.20
@angular-devkit/build-angular              0.803.20
@angular-devkit/build-optimizer            0.803.20
@angular-devkit/build-webpack              0.803.20
@angular-devkit/core                            8.3.20
@angular-devkit/schematics                 8.3.20
@angular/cli                                           8.3.20
@ngtools/webpack                                8.3.20
@nguniversal/common                          8.1.1
@nguniversal/express-engine                8.1.1
@nguniversal/module-map-ngfactory-loader   8.1.1
@schematics/angular                        8.3.20
@schematics/update                         0.803.20
rxjs                                            6.5.3
typescript                                 3.5.3
webpack                                    4.39.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

5reactions
bgevercommented, Dec 16, 2019

0.5 is working well for me with Angular 8, so I don’t see issues for dropping support in 0.6.

Thanks for looking into the issue! 👍

2reactions
devoto13commented, Dec 16, 2019

@ensnared I think you’re right. Most likely I served the app in development mode and compiled in production mode, but never tried to serve in production mode.

@bgever Thanks for the reproduction! I’ve looked into it and in fact it crashes even with the basic setup described in the README using AoT. I’ve tried to debug it a bit and it seems that library build produced by Angular CLI 9.x does not really work for the Angular 8.x application as nothing really changed in the relevant source code of the angular-fontawesome.

Given that this is a tooling issue, which I don’t think will be fixed by Angular/Angular CLI and the amount of problems people get trying to run 0.6.0-alpha.0 on Angular 8.x I’m going to resolve it by dropping support for Angular 8.x in 0.6.0 release of angular-fontawesome. So use 0.5.0 for Angular 8.x and 0.6.x for Angular 9.x.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NullInjectorError: No provider for FaConfig - Stack Overflow
This is an issue in the latest version 0.6.0-alpha.0, which may get installed automatically when you don't specify the version.
Read more >
[Debugging] NullInjectorError: No provider for {Class}!
29K views 1 year ago [Debugging] Angular Error Messages ... In this video, you'll learn what the error "NullInjectorError: No provider for ...
Read more >
ng version - Angular
NG0201: No Provider Found · NG0203: `inject()` must be called from an injection context · NG0209: Invalid multi provider · NG02200: Missing Iterable...
Read more >
NullInjectorError: No provider for MatSelect! in angular 14
A angular-cli project based on @angular/animations, @angular/compiler, @angular/core, @angular/common, @angular/platform-browser-dynamic, @angular/forms, ...
Read more >
angular/core@8.2.14 - Snyk Vulnerability Database
Learn more about known @angular/core 8.2.14 vulnerabilities and licenses detected. ... latest non vulnerable version.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found