无法使用TypeScript导入Angular2中的外部模块

时间:2016-11-27 17:52:34

标签: angular typescript-typings

我正在尝试将marker-animate-unobtrusive库导入到我的angular2项目中。由于它已经有了类型定义,我尝试过这样:

chmod -R 0777 db/

安装成功后,我试图导入其中一个模块:

npm install marker-animate-unobtrusive --save npm install @types/marker-animate-unobtrusive --save typings install dt~google.maps --global --save typings install dt~marker-animate-unobtrusive --global --save

但就在那一刻,我收到了这个错误:

import * as SlidingMarker from 'marker-animate-unobtrusive';

但是我检查了index.d.ts并发现该模块已经被声明了。

我在这里错过了什么或做错了什么?

编辑1:

File '/Users/.../node_modules/@types/marker-animate-unobtrusive/index.d.ts' is not a module.

0 个答案:

没有答案
相关问题