【发布时间】:2016-07-14 07:46:27
【问题描述】:
我使用 VS Code 1.3.0 作为编辑器和 Typescript 2.0。我的根目录中有一个tsconfig.json,其文件属性为
"files":["newfile.ts"] 和 newfile.ts 在我的根目录中。我跑了
npm i --save lodash
npm i @types/lodash --save 并安装了定义文件。在我的 newfile.ts 我有
import * as _ from "lodash" and I'm getting a module not found error on lodash. If lodash and its type are installed, why themodule not found` 错误?
我已经多次重启我的编辑器,但无济于事。
【问题讨论】: