解决npm init vue@next创建项目Vue: Cannot find module ./App.vue or its corresponding type declaratio

打开创建后的env.d.ts

写入

/// 
declare module '*.vue' {
  import type { DefineComponent } from 'vue'
  const component: DefineComponent<{}, {}, any>
  export default component
}

你可能感兴趣的:(npm,vue.js,javascript)