2

I have used ngx-graph to implement visualization of a DAG. It works perfectly during development and throws no errors. While in a deployed build, it stacks up errors in the console.

enter image description here

I guess it is looking for some provider but none is described in the package or demo. Here's my app.module.ts file :

import { NgxChartsModule } from '@swimlane/ngx-charts';
import { NgxGraphModule } from '@swimlane/ngx-graph'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
...
imports: [
    ...,
    NgxChartsModule,
    NgxGraphModule,
    BrowserAnimationsModule
]
MonkeyScript
  • 4,776
  • 1
  • 11
  • 28

2 Answers2

1

We also had this problem with AOT compilation using ngx-graph with Angular 7 and didn't want to disable AOT compilation.

It seems that previous versions of ngx-graph and ngx-charts are working correctly with AOT compilation.

We have tried with

"@swimlane/ngx-graph": "5.5.0"

"@swimlane/ngx-charts": "8.1.0"

and it is working fine

More info in this issue

hmartos
  • 861
  • 2
  • 10
  • 19
1

The error was caused because ngx-graph had dependency on ngx-charts in earlier versions. They fixed this in version 6.0.0+ and the dependency has been removed.

MonkeyScript
  • 4,776
  • 1
  • 11
  • 28