StaticInjectorError for TooltipService
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here
Current behavior Current version of ngx-graph throws error to the console and the graph won’t render when --aot build used, therefore we cannot turn on aot nor build optimizer for production builds.
StaticInjectorError(Platform: core)[TooltipService -> InjectionService]:
NullInjectorError: No provider for InjectionService!
at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:3228)
at resolveToken (core.js:3473)
at tryResolveToken (core.js:3417)
at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:3314)
at resolveToken (core.js:3473)
at tryResolveToken (core.js:3417)
at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:3314)
at resolveNgModuleDep (core.js:19784)
at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:20473)
at resolveDep (core.js:20844)
It doesn’t matter if I use tooltips or not in the graph the above mentioned error exists for both cases.
Expected behavior The grap should be rendered correctly and the app should not throw any error.
Reproduction of the problem
Integrate ngx-graph in your app following the provided readme and try to ether run ng serve --aot or create a production angular build.
Please tell us about your environment: npm 6.4.1, Angular CLI 7.1.3, webpack 4.26.0
- ngx-graph version: 5.1.1 but 5.2.1 also affected
- Angular version: 7.1.3
- Browser: all
- Language: all
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:16
Top Results From Across the Web
No provider for InjectionService using AOT - Stack Overflow
The error : ERROR NullInjectorError: StaticInjectorError(AppModule)[TooltipService -> InjectionService]: StaticInjectorError( ...
Read more >Bountysource
Error: StaticInjectorError(AppServerModule)[TooltipService -> InjectionService]:
Read more >No Provider For Injectionservice Using Aot - ADocLib
The error : ERROR NullInjectorError: StaticInjectorErrorAppModule[TooltipService InjectionService]: StaticInjectorError. Providers in Angular are key to how ...
Read more >NullInjectorError: No provider for InjectionService using AOT
The error : ERROR NullInjectorError: StaticInjectorError(AppModule)[TooltipService -> InjectionService]: StaticInjectorError(Platform: core)[TooltipService -> ...
Read more >NullInjectorError: No provider for function(){}! - AngularFix
Uncaught Error: StaticInjectorError(Platform: core)[function(){}]: ... register services at root level providers: [ TooltipService, ...
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 Free
Top 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

@jadielam Provide InjectionService in AppModule
Facing the same issue and tried all the solution linked before,
"@angular/core": "~8.2.14", "@swimlane/ngx-charts": "12.0.1", "@swimlane/ngx-graph": "^6.2.0",Does anyone have the solution?? adding or removing the modules (graph and chart) doesn’t seem to solve nothing and neither adding the InjectionService to the providers 😕