Ngx-charts: ERROR in Unexpected value 'undefined' imported by the module '傻a in /var/www/html/pwa-vimbo-new/node_modules/@swimlane/ngx-charts/swimlane-ngx-charts.d.ts'

Created on 13 Dec 2019  路  20Comments  路  Source: swimlane/ngx-charts

Describe the bug
ERROR in Unexpected value 'undefined' imported by the module '傻a in /var/www/html/pwa-vimbo-new/node_modules/@swimlane/ngx-charts/swimlane-ngx-charts.d.ts'

Version

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

Angular CLI: 8.3.4
Node: 10.15.3
OS: linux 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/cdk                               8.2.3
@angular/cli                               8.3.20
@angular/flex-layout                       8.0.0-beta.27
@angular/material                          8.2.3
@angular/material-moment-adapter           8.2.3
@ngtools/webpack                           8.3.20
@nguniversal/express-engine                8.2.6
@nguniversal/module-map-ngfactory-loader   8.2.6
@schematics/angular                        8.3.4 (cli-only)
@schematics/update                         0.803.4 (cli-only)
rxjs                                       6.5.3
typescript                                 3.5.3
webpack                                    4.39.2

Bug

Most helpful comment

Facing same issue after updating to version 13.0.0

All 20 comments

Had the same issue when doing AOT build with version 13.0.0, had to revert to older version (12.1.0)

I can confirm this issue. Using 13.0.0 and also had to revert to older version.

exact, going back to the previous version works, the 13 doesn't work

I was able to resolve build with this patch. Removed usage of barrel-file in many imports. Can't say which one (if any) would be the real reason to the problem

diff --git projects/swimlane/ngx-charts/src/lib/common/chart-common.module.ts projects/swimlane/ngx-charts/src/lib/common/chart-common.module.ts
index 9c893328..82628480 100644
--- projects/swimlane/ngx-charts/src/lib/common/chart-common.module.ts
+++ projects/swimlane/ngx-charts/src/lib/common/chart-common.module.ts
@@ -2,20 +2,23 @@ import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';

 import { ChartComponent } from './charts/chart.component';
-import { ScaleLegendComponent, LegendComponent, LegendEntryComponent, AdvancedLegendComponent } from './legend';
+import { ScaleLegendComponent } from './legend/scale-legend.component';
+import { LegendComponent } from './legend/legend.component';
+import { LegendEntryComponent } from './legend/legend-entry.component';
+import { AdvancedLegendComponent } from './legend/advanced-legend.component';
 import { BaseChartComponent } from './base-chart.component';
 import { AxesModule } from './axes/axes.module';
-import { TooltipModule } from './tooltip';
+import { TooltipModule } from './tooltip/tooltip.module';
 import { CircleSeriesComponent } from './circle-series.component';
 import { CircleComponent } from './circle.component';
 import { GridPanelComponent } from './grid-panel.component';
 import { GridPanelSeriesComponent } from './grid-panel-series.component';
 import { SvgLinearGradientComponent } from './svg-linear-gradient.component';
 import { SvgRadialGradientComponent } from './svg-radial-gradient.component';
-import { Timeline } from './timeline';
+import { Timeline } from './timeline/timeline.component';
 import { AreaComponent } from './area.component';
 import { TooltipArea } from './tooltip-area.component';
-import { CountUpDirective } from './count';
+import { CountUpDirective } from './count/count.directive';

 const COMPONENTS = [
   AreaComponent,
diff --git projects/swimlane/ngx-charts/src/lib/common/charts/chart.component.ts projects/swimlane/ngx-charts/src/lib/common/charts/chart.component.ts
index 7f060160..c49a6d74 100644
--- projects/swimlane/ngx-charts/src/lib/common/charts/chart.component.ts
+++ projects/swimlane/ngx-charts/src/lib/common/charts/chart.component.ts
@@ -9,7 +9,7 @@ import {
   SimpleChanges
 } from '@angular/core';
 import { trigger, style, animate, transition } from '@angular/animations';
-import { TooltipService } from '../tooltip';
+import { TooltipService } from '../tooltip/tooltip.service';

 @Component({
   providers: [TooltipService],
diff --git projects/swimlane/ngx-charts/src/lib/polar-chart/polar-chart.module.ts projects/swimlane/ngx-charts/src/lib/polar-chart/polar-chart.module.ts
index 70de8ab1..dcb56e23 100644
--- projects/swimlane/ngx-charts/src/lib/polar-chart/polar-chart.module.ts
+++ projects/swimlane/ngx-charts/src/lib/polar-chart/polar-chart.module.ts
@@ -2,8 +2,8 @@ import { NgModule } from '@angular/core';
 import { ChartCommonModule } from '../common/chart-common.module';
 import { PolarChartComponent } from './polar-chart.component';
 import { PolarSeriesComponent } from './polar-series.component';
-import { PieChartModule } from '../pie-chart/';
-import { LineChartModule } from '../line-chart/';
+import { PieChartModule } from '../pie-chart/pie-chart.module';
+import { LineChartModule } from '../line-chart/line-chart.module';

 @NgModule({
   imports: [ChartCommonModule, PieChartModule, LineChartModule],

Facing same issue after updating to version 13.0.0

same

same [2]

I have the same problem

same

I have the same issue

I have the same issue

Im getting the same error

same error

I have the same error.

Same error :(

Also getting the error, downgraded to 12.1.0 and everything seems to be working now.

same issue in my situation i had downgrade to version 12.1.0 and works great

Is anyone able to confirm.. .is this only an issue for ng8.... does ng9 work as expected?

Is anyone able to confirm.. .is this only an issue for ng8.... does ng9 work as expected?

I have this issue with ng9

Resolved in 13.0.1. Apparently barrel imports are still an issue with AOT, so had to remove all of them.

Was this page helpful?
0 / 5 - 0 ratings