【发布时间】:2016-07-02 11:14:51
【问题描述】:
我正在尝试在我的应用中使用 expressjs。
使用typings install express --ambient --save 安装后,我运行tsc,但出现两个错误:
typings/main/ambient/express/index.d.ts(17,34):错误 TS2307:不能 找到模块“服务静态”。 typings/main/ambient/express/index.d.ts(18,27):错误 TS2307:不能 找到模块“express-serve-static-core”。
所以,我尝试安装两者:
typings install serve-static --ambient --save
typings install express-serve-static --ambient --save
然后我再次运行 tsc,但又出现一个错误:
typings/main/ambient/serve-static/index.d.ts(79,24):错误 TS2307: 找不到模块“mime”。
我该如何解决这些问题?如何自动安装 express 的所有依赖项?
【问题讨论】:
标签: typescript definitelytyped tsd