vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.75k stars 593 forks source link

Vue "has no exported member 'onBeforeMount'." #3302

Open p3v9d5ui opened 2 years ago

p3v9d5ui commented 2 years ago

Info

Problem

Incorrectly reports "Module '"../../../node_modules/vue/dist/vue"' has no exported member 'onBeforeMount'.Vetur(2305)" for this import:

import { defineComponent, onBeforeMount } from 'vue'

image

Reproducible Case

Vue 3/Typescript project with these dependencies:

├── @quasar/extras@1.12.2 ├── @quasar/vite-plugin@1.0.4 ├── @rollup/plugin-alias@3.1.9 ├── @typescript-eslint/eslint-plugin@5.9.0 ├── @typescript-eslint/parser@5.9.0 ├── @vitejs/plugin-vue@1.10.2 ├── eslint@8.6.0 ├── install@0.13.0 ├── quasar@2.4.3 ├── sass@1.32.13 ├── typescript@4.5.4 ├── vite@2.7.10 ├── vue-router@4.0.12 ├── vue-tsc@0.28.10 ├── vue@3.2.26 └── vuex@4.0.2

yoyo930021 commented 1 year ago

Please provide a repro case. https://github.com/vuejs/vetur/blob/master/.github/NO_REPRO_CASE.md