ngx-echarts icon indicating copy to clipboard operation
ngx-echarts copied to clipboard

TypeError: Cannot destructure property 'init' of 'object null' as it is null.

Open cctomato opened this issue 4 years ago • 3 comments

Angular版本:8.3.0 echarts版本:4.9.0 ngx-echarts版本:5.2.1 本地开发,npm run start都没有问题,图表也能正常访问。npm run build本地打包也没有报错。 但是部署打包后的文件到nginx里面访问就会报标题的那个错,图表也显示不出来。 stackoverflow有人遇到过这个问题,但是似乎也无法解决这个报错。

image

查看控制台报错指向这里 image

大家有没有遇到同样的问题

cctomato avatar Dec 03 '20 08:12 cctomato

遇到了同样的问题

hsh007 avatar Jan 12 '21 02:01 hsh007

Angular 8.2

 "ngx-echarts": "5.2.2",
 "echarts": "5.0.2",

This problem with ng build --prod

 "production": {
  "fileReplacements": [
    {
      "replace": "src/environments/environment.ts",
      "with": "src/environments/environment.prod.ts"
    }
  ],
  "optimization": true,
  "outputHashing": "all",
  "sourceMap": false,
  "extractCss": true,
  "namedChunks": false,
  "aot": true,
  "extractLicenses": true,
  "vendorChunk": false,
  "buildOptimizer": true
},
"angularCompilerOptions": {
  "enableIvy": false,
}

I use NgxEchartsModule.forRoot({echarts}),

Since in the case of NgxEchartsModule.forRoot({ echarts: () => import('echarts') }),

The error drops as in this issue: https://github.com/xieziyu/ngx-echarts/issues/283

BanannaLopal avatar Feb 17 '21 14:02 BanannaLopal

遇到了同样的问题,已经回退 4.2.2 版本了。

vanswang avatar Feb 23 '21 02:02 vanswang