在使用viser-ng的时候,在画饼状图的时候,会遇到DataSet这个包,然后保存编译运行的时候会报错如下:

ERROR in src/app/testbing/testbing.component.ts(1,26): error TS2307: Cannot find module '@antv/data-set'.

错误:Cannot find module '@antv/data-set'.

打开nodo_modules找到@antv目录如下:

Angular学习笔记27:使用viser-ng报错:Cannot find module '@antv/data-set'解决办法

少了data-set这个依赖。

 

解决方案:安装data-set

npm install @antv/data-set
wujiayus-MacBook-Pro:demo wjy$ npm install @antv/data-set
npm WARN [email protected] requires a peer of [email protected]^0.7.2 but none is installed. You must install peer dependencies yourself.

+ @antv/[email protected]
added 24 packages from 12 contributors and audited 38656 packages in 11.341s

再次查看nodo_modules的@antv目录:

Angular学习笔记27:使用viser-ng报错:Cannot find module '@antv/data-set'解决办法

然后保存编译就不会报错了。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2022-01-07
  • 2021-08-24
  • 2021-12-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-21
  • 2021-05-23
  • 2021-05-14
相关资源
相似解决方案