Subscribe on changes!

vite+vue3+ts4.4.4 doesn't work , show as ' has no exported member 'ref' '

avatar
Nov 26th 2021

Version

3.2.16

Reproduction link

https://sfc.vuejs.org/

Steps to reproduce

i use npm init vitejs/app to create a typescript project。 typescript version : 4.4.4 vue version : 3.2.16

when i write the code 'import { defineComponent, ref , onMounted } from "vue";' always show me the wrong : Module '"../node_modules/vue/dist/vue"' has no exported member 'onMounted'. i tried to change the ts version and vue version,but doesn't work

What is expected?

how can i solve this issue?

What is actually happening?

how can i solve this issue?


how can i solve this issue?

avatar
Nov 26th 2021

Please provide a repl or warehouse address:sweat_smile:

avatar
Nov 26th 2021

i have solved this question by install vetur plugin in vscode。 thanks

avatar
Jan 13th 2022

hello,you means install vetur can resolved this warning? but i tried and unuseful