【发布时间】:2021-03-02 11:54:20
【问题描述】:
所以我创建了一个 vue 应用程序并从 vue 模块导入了 Vue 但我收到了这个错误
ERROR in src/main.ts:4:5
TS2339: Property 'use' does not exist on type 'typeof import("/data/data/com.termux/files/home/ishankbg.tech/node_modules/vue/dist/vue")'.
2 | import App from './App.vue'
3 | import { firestorePlugin } from 'vuefire';
> 4 | Vue.use(firestorePlugin);
| ^^^
5 | createApp(App).mount('#app');
6 |
我在我的 vue 应用程序中使用打字稿。 我使用@vue/cli 生成了项目。 我想使用 vuefire 的 firestorePlugin。
我正在使用 Vue3 这是源代码
import Vue, { createApp } from 'vue'
import App from './App.vue'
import { firestorePlugin } from 'vuefire';
Vue.use(firestorePlugin);
createApp(App).mount('#app');
我不确定是什么导致了这个错误
【问题讨论】:
标签: javascript typescript vue.js vuejs3 vuefire