Angular 2找不到模块d3-cloud [英] Angular 2 cannot find module d3-cloud

查看:91
本文介绍了Angular 2找不到模块d3-cloud的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的带打字稿的angular 2应用程序,我使用systemjs作为模块,使用grunt进行构建 在systemJsconfig文件中Im加载 地图 :{ ..... 'd3':'npm:d3/build/d3.js', 'd3-cloud':'npm:d3-cloud', } 在我的组件中: 导入d3和d3-cloud 从'd3'导入*作为D3; 从'd3-cloud'导入*作为云;

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运行正常,但d3云未加载.当我使用grund进行构建时,会引发编译时错误 找不到模块"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", .....

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

任何帮助将不胜感激,谢谢您

Any help will be much appreciated and thank you

推荐答案

忘记为d3-cloud添加类型.现在已修复

Forgot to add typings for d3-cloud. Now fixed

这篇关于Angular 2找不到模块d3-cloud的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆