Angular学习笔记27:使用viser-ng报错:Cannot find module '@antv/data-set'解决办法
在使用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目录如下:
少了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目录:
然后保存编译就不会报错了。