【Vue3 + TypeScript】报错 Could not find a declaration file for module ... / 找不到模块或其相应的类型声明

在 Vue3 + Typescript 项目中,报错 Could not find a declaration file for module ./layouts/BasicLayout.vue . c:/Codefield/项目/yupao-frontend/src/layouts/BasicLayout.vue.js implicitly has an any type. 或者 找不到模块或其相应的类型声明。

解决方法:

安装一个包 npm i --save-dev @types/node ,问题解决~

猜你喜欢

转载自blog.csdn.net/XiugongHao/article/details/132343944
今日推荐