{"id":188,"date":"2021-12-31T09:00:00","date_gmt":"2021-12-31T09:00:00","guid":{"rendered":"http:\/\/frontendguruji.com\/?p=188"},"modified":"2022-01-14T11:09:18","modified_gmt":"2022-01-14T11:09:18","slug":"warn-export-default-imported-as-vue-was-not-found-in-vue","status":"publish","type":"post","link":"https:\/\/frontendguruji.com\/blog\/warn-export-default-imported-as-vue-was-not-found-in-vue\/","title":{"rendered":"WARN export &#8216;default&#8217; (imported as &#8216;Vue&#8217;) was not found in &#8216;vue&#8217;"},"content":{"rendered":"\n<p>Hello Friends! &#x1f64f;, today while I was working on <a rel=\"noreferrer noopener\" href=\"http:\/\/frontendguruji.com\/how-to-setup-a-vue-js-project-from-scratch-without-vue-cli\/\" target=\"_blank\">How to setup a Vue JS v3 project from scratch (without Vue CLI) (Including SFC\u2019s &amp; Vue Router v4)<\/a>, When I compiled the App, I got below warning &#x26a0;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img width=\"588\" height=\"415\" src=\"http:\/\/frontendguruji.com\/wp-content\/uploads\/2022\/01\/image-4.png\" alt=\"\" class=\"wp-image-189\" srcset=\"https:\/\/frontendguruji.com\/blog\/wp-content\/uploads\/2022\/01\/image-4.png 588w, https:\/\/frontendguruji.com\/blog\/wp-content\/uploads\/2022\/01\/image-4-300x212.png 300w\" sizes=\"(max-width: 588px) 100vw, 588px\" \/><figcaption><span style=\"color:#cccccc\" class=\"has-inline-color\">export &#8216;default&#8217; (imported as &#8216;Vue&#8217;) was not found in &#8216;vue&#8217;<\/span><\/figcaption><\/figure>\n\n\n\n<p>So checked the way I have imported the Vue, it&#8217;s like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import Vue from \"vue\";<\/code><\/pre>\n\n\n\n<p>Now after doing some research &#x1f50d;&#x1f601;, 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 <strong>import as<\/strong> or using <strong>destructuring<\/strong>, I am able to use Vue &#x1f973;.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import * as Vue from \"vue\";\n\nOR\n\nimport { createApp } from \"vue\";<\/code><\/pre>\n\n\n\n<p>Thanks &#x1f64f;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello Friends! &#x1f64f;, today while I was working on How to setup a Vue JS v3 project from scratch (without Vue CLI) (Including SFC\u2019s &amp; Vue Router v4), When I compiled the App, I got below warning &#x26a0;. So checked the way I have imported the Vue, it&#8217;s like: Now after doing some research &#x1f50d;&#x1f601;, &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/frontendguruji.com\/blog\/warn-export-default-imported-as-vue-was-not-found-in-vue\/\"> <span class=\"screen-reader-text\">WARN export &#8216;default&#8217; (imported as &#8216;Vue&#8217;) was not found in &#8216;vue&#8217;<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[30],"tags":[12,31,32,9,41],"_links":{"self":[{"href":"https:\/\/frontendguruji.com\/blog\/wp-json\/wp\/v2\/posts\/188"}],"collection":[{"href":"https:\/\/frontendguruji.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/frontendguruji.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/frontendguruji.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/frontendguruji.com\/blog\/wp-json\/wp\/v2\/comments?post=188"}],"version-history":[{"count":0,"href":"https:\/\/frontendguruji.com\/blog\/wp-json\/wp\/v2\/posts\/188\/revisions"}],"wp:attachment":[{"href":"https:\/\/frontendguruji.com\/blog\/wp-json\/wp\/v2\/media?parent=188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/frontendguruji.com\/blog\/wp-json\/wp\/v2\/categories?post=188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/frontendguruji.com\/blog\/wp-json\/wp\/v2\/tags?post=188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}