Error: StaticInjectorError(AppServerModule)[TooltipService -> InjectionService]:
See original GitHub issueI’m submitting a … (check one with “x”)
- bug report - search github for a similar issue or PR before submitting
- feature request
- support request - use StackOverflow (add the
ngx-charts
tag) or the gitter chat for support questions
Current behavior When running angular 6 app with universal the server side code reports the mentioned injector error. It doesn’t break the app tho.
ERROR { Error: Uncaught (in promise): Error: StaticInjectorError(AppServerModule)[TooltipService -> InjectionService]:
StaticInjectorError(Platform: core)[TooltipService -> InjectionService]:
NullInjectorError: No provider for InjectionService!
For now I stopped this error by putting an ngIf on the html element to only show if platform is browser.
Expected behavior
Reproduction of the problem
What is the motivation / use case for changing the behavior?
Please tell us about your environment: Using angular universal express setup and ngx-charts-bar-vertical-2d in html template.
-
ngx-charts version: 9.0.0
-
Angular version: 6.1.0
-
Browser: terminal
-
Language: Typescript
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:11
Top Results From Across the Web
Angular SSR Serve Error NullInjectorError: StaticInjectorError ...
I have injected all services. I have injected all components. Error: ERROR Error [NullInjectorError]: StaticInjectorError(AppServerModule)[ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have same problem. My workaround for that is used this
--aot=false --build-optimizer=false
for build in prod.After hours of battle, it seems to be definitely packaging issue. Porting
@swimlane/ngx-charts
tong-packagr
solves this issue, #18 and tons of other (and potential) issues 😃@marjan-georgiev, porting to
ng-packagr
seems to be not so complex, with minimum code changes, may be should be considered? why not?So far to make it working in my case:
d3-*
tod3
imports to where defined
Everything else works out of the box including tests, demo app etc. without any notable changes to user.