【问题标题】:ngx-graph : Build failsngx-graph:构建失败
【发布时间】:2018-12-13 08:04:18
【问题描述】:

我使用 ngx-graph 来实现 DAG 的可视化。它在开发过程中完美运行并且不会引发错误。在已部署的构建中,它会在控制台中堆积错误。

我猜它正在寻找一些提供者,但包或演示中没有描述。这是我的 app.module.ts 文件:

import { NgxChartsModule } from '@swimlane/ngx-charts';
import { NgxGraphModule } from '@swimlane/ngx-graph'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
...
imports: [
    ...,
    NgxChartsModule,
    NgxGraphModule,
    BrowserAnimationsModule
]

【问题讨论】:

    标签: angular ngx-graph


    【解决方案1】:

    我们在使用 ngx-graph 和 Angular 7 进行 AOT 编译时也遇到了这个问题,并且不想禁用 AOT 编译。

    似乎以前版本的ngx-graphngx-charts 可以在AOT 编译中正常工作。

    我们已经尝试过

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

    它工作正常

    更多信息在issue

    【讨论】:

      【解决方案2】:

      该错误是因为 ngx-graph 在早期版本中依赖于 ngx-charts。他们在 6.0.0+ 版本中修复了此问题,并且已删除依赖项。

      【讨论】:

        猜你喜欢
        • 2018-03-14
        • 1970-01-01
        • 2021-08-05
        • 2021-11-11
        • 2021-04-27
        • 1970-01-01
        • 2022-07-07
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多