模块““vue””没有导出的成员“createApp”。
报错: 模块““vue””没有导出的成员“createApp”。
解决方法:执行命令行 npm i typescript@4.3.5
找不到模块“./App.vue”或其相应的类型声明。
报错:找不到模块“./App.vue”或其相应的类型声明。
解决方法: 在src根目录下创建.d.ts文件,添加如下代码即可
declare module '*.vue' { import type { DefineComponent } from 'vue' // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types const component: DefineComponent<{}, {}, any> export default component }
复制