TS7016: Could not find a declaration file for module

报错信息:

TS7016: Could not find a declaration file for module 'jest-matchers'. 'D:/Projects/Vue/Vue3/liantong/liantong_project/node_modules/[email protected]@jest-matchers/build/index.js' implicitly has an 'any' type. Try `npm i --save-dev @types/jest-matche

在使用vue3+ts+vite是引入一个模块,该模块已经下载了,但还是无法引入报错如上

尝试在vite-env.d.ts文件中添加:

declare module '依赖名 or 文件'

你可能感兴趣的:(TypeScript,JavaScript,Vue,javascript,vue.js,前端)