[ngx-echarts] 使用狀況問題排除方式
Error: The target entry-point "ngx-echarts" has missing dependencies: - @juggle/resize-observer 要多安裝 npm install @juggle/ resize - observer - polyfill -- save - dev 從下面這篇文知道的 https://iter01.com/574893.html 首先,我們在專案中要安裝echarts庫,程式碼如下: npm install echarts -- save npm install ngx - echarts -- save 然後,一定要安裝下面這個包,否則10.x版本會報這個錯誤的 (ERROR in The target entry-point “ngx-echarts” has missing dependencies: resize-observer-polyfill) npm install resize - observer - polyfill -- save - dev 下一步就是在對應的module裡面匯入NgxEchartsModule import { NgxEchartsModule } from 'ngx-echarts' ; import * as echarts from 'echarts' ; imports : [ NgxEchartsModule . forRoot ({ echarts , }) ], 在對應的ts元件中,初始化資料 public chartOption1 : EChartsOption = {}; constructor () { } ngOnInit (): void { this . initChart (); } initChart () { this . chartOption1 = { tooltip : { trigger : 'axis' , axisPointer : { ...