我正在尝试tsc
在一个使用 Vite 搭建的 React 项目上运行——所有其他命令运行良好,项目加载和构建成功,但是运行时tsc
出现此错误:
../../node_modules/@types/download/index.d.ts:9:10 - error TS2614: Module '"got"' has no exported member 'GotEmitter'. Did you mean to use 'import GotEmitter from "got"' instead?
9 import { GotEmitter, GotOptions } from "got";
~~~~~~~~~~
../../node_modules/@types/download/index.d.ts:13:58 - error TS2315: Type 'GotOptions' is not generic.
13 interface DownloadOptions extends DecompressOptions, GotOptions<string | null> {
~~~~~~~~~~~~~~~~~~~~~~~~~
我可以看到它与我自己没有安装的类型模块有关。知道这是从哪里来的吗?