首页 > 解决方案 > npm 抛出此错误 '"**/node_modules/@angular/core/core"' has no export member 'ɵɵFactoryDe​​f'

问题描述

我是 angular 新手,我正在尝试使用 highcharts 构建一个 palteform,但出现此错误:

node_modules/highcharts-angular/lib/highcharts-chart.component.d.ts(22,25) 中的错误:错误 TS2694:命名空间 '"C:/Users/HP/Desktop/PFE/Nouveau dossier 3/dashboard/node_modules/ @angular/core/core"' 没有导出成员 'ɵɵFactoryDe​​f'。node_modules/highcharts-angular/lib/highcharts-chart.component.d.ts(23,18):错误 TS2314:通用类型 'ɵɵComponentDefWithMeta' 需要 6 个类型参数。

** Angular Live Development Server 正在监听 localhost:4200,在http://localhost:4200/上打开浏览器** i 「wdm」:编译失败。

标签: angularhighcharts

解决方案


看起来像是从 angular 8 升级到 9 后出现的问题,可能的解决方案是删除你的node_modulesnpm install再次运行。

原帖:https ://stackoverflow.com/a/59741546/12285185

如果这没有帮助,请在 stackblitz 等在线编辑器中重新创建您的配置,以便我可以检查它为什么不工作,或者可以做什么。


推荐阅读