Subscribe on changes!

Module '"../node_modules/vue/dist/vue"' has no exported member 'Plugin'

avatar
Aug 22nd 2021

Version

3.0.11

Reproduction link

url

Steps to reproduce

Create a new SFC application using Vue 3.0.11 and typescript Use the statement to import required modules import { App, Plugin } from 'vue'

What is expected?

To work as usual

What is actually happening?

Error appears


Everything was working well, just removed the node modules, installed back everything, and now getting this error

avatar
Aug 22nd 2021

Using import type {Plugin} from 'vue' should work

avatar
Aug 22nd 2021

using lang="ts" when using Typescript would also be a good idea.

avatar
Aug 22nd 2021

Jokes aside though, import type was generally required in Vite before 2.5 I believe?

avatar
Aug 22nd 2021

I got the issue solved by upgrading the typescript to 4.3.5. I guess there might be some recent changes in Vue which might have changed for the older typescript.