/home/Documents/node_modules/cheerio-select/lib/index.d.ts(1,15) 中的 TypeScript 错误:[0] ',' 预期。TS100



你好,当我运行npm run dev&npm在我的终端中运行构建。

[0]编译失败。[0][0]/home/Documents/frontend/node_modules/cleario-select/lib/index.d.ts中的[0]TypeScript错误/home/fislam/Documents/frontend/client dashboard/node_modules/cheelio-select/lib/index.d.ts(1,15(:应为[0]","。TS1005[0][0]>1|导入{type Options为CSSSelectOptions}从";css选择";[0]|^[0]2|从"导入类型{Element,AnyNode,Document};domhandler";;[0]3|从"导出{过滤器、假名、别名};css选择";[0]4|导出接口选项扩展了CSSelectOptions<AnyNode,元素>{^C[1]信息:捕获信号:SIGINT[1][nodemon]正在退出[1]npm运行dev:server--静默退出,代码为SIGINT[0]npm运行dev:client--静默退出,代码为SIGINT

对我来说,问题是我使用了一个过时的cheerio版本。我通过运行修复了它

yarn add cheerio@latest

您也可以尝试通过运行将TS更新到最新版本

npm install -g typescript@latest

最新更新