简体   繁体   中英

Vue and Quasar - Module '“../../node_modules/vue/types”' has no exported member 'defineComponent'

I've been trying to solve this issue for a while now. I'm trying to port a project created using "vue create" to a project created using "quasar create". However, I get the following error when I try to use one of my component.vue files in the quasar project:

Module '"../../node_modules/vue/types"' has no exported member 'defineComponent'

错误

My import statement looks like this: import { defineComponent } from 'vue'

Is there a way to fix this? I've been searching for a solution for hours but couldn't find one.

I finally figured out the issue. Replacing the import statement with the following seems to have solved the issue: import { defineComponent } from '@vue/composition-api

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM