Angular 2 cannot find module d3-cloud

泪湿孤枕 提交于 2019-12-12 01:37:13

问题


For my angular 2 app with typescript, Im using systemjs for modules and grunt for build In systemJsconfig file Im loading map :{ ..... 'd3': 'npm:d3/build/d3.js', 'd3-cloud' : 'npm:d3-cloud', } In my component: importing the d3 and d3-cloud import * as D3 from 'd3'; import * as cloud from 'd3-cloud';

D3 is working fine but d3 cloud is not loading. When I build using grund, it throws compile time error Cannot find Module 'd3-cloud'

Package.json: ..... "d3": "^4.2.6", "d3-cloud": "^1.2.1", .....

Any help will be much appreciated and thank you


回答1:


Forgot to add typings for d3-cloud. Now fixed



来源:https://stackoverflow.com/questions/39909147/angular-2-cannot-find-module-d3-cloud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!