WARN export ‘default’ (imported as ‘Vue’) was not found in ‘vue’

Hello Friends! 🙏, today while I was working on How to setup a Vue JS v3 project from scratch (without Vue CLI) (Including SFC’s & Vue Router v4), When I compiled the App, I got below warning ⚠.

export ‘default’ (imported as ‘Vue’) was not found in ‘vue’

So checked the way I have imported the Vue, it’s like:

import Vue from "vue";

Now after doing some research 🔍😁, I got to know that in Vue v3, Vue is not getting exported by default, instead now there are named exports. That is the reason of the warning, so changing the code to below format either using import as or using destructuring, I am able to use Vue 🥳.

import * as Vue from "vue";

OR

import { createApp } from "vue";

Thanks 🙏.

1 thought on “WARN export ‘default’ (imported as ‘Vue’) was not found in ‘vue’”

  1. Hi, thank you for bringing this up, solved my issue beautifully. Your post is very neat, to the point, deliver the reasoning and solution concisely.
    Can you share the source? I cannot find in the documentation the part about Vue not getting exported by default. Thank you and have a great day! – From Tokyo, Japan –

Leave a Comment

Your email address will not be published.