为什么我在vue.js 3中得到以下错误;“external_commonjs_vue_commonjs2_vue_root_Vue_default.a未定义”

vuv7lop3  于 2023-06-30  发布在  Vue.js
关注(0)|答案(1)|浏览(425)

我安装了一个名为vue-file-agent的文件上传组件,并在控制台中得到错误"external_commonjs_vue_commonjs2_vue_root_Vue_default.a is undefined"

验证码:

import { createApp } from 'vue'
import App from './App.vue'

import VueFileAgent from 'vue-file-agent';
import 'vue-file-agent/dist/vue-file-agent.css';

createApp(App).use(VueFileAgent).mount('#app')
ia2d9nvy

ia2d9nvy1#

import { createApp } from 'vue'
import App from './App.vue'
import VueFileAgent from 'vue-file-agent'
import 'vue-file-agent/dist/vue-file-agent.css'

const app = createApp(App)
app.component('VueFileAgent', VueFileAgent)
app.mount('#app')

相关问题