akxcv / vuera

:eyes: Vue in React, React in Vue. Seamless integration of the two. :dancers:
MIT License
4.3k stars 242 forks source link

TypeError: Cannot call a class as a function #70

Closed Enigma10 closed 5 years ago

Enigma10 commented 5 years ago

I am getting this error when I import my react component in Vue component

vue.esm.js?a026:1841 TypeError: Cannot call a class as a function
    at _classCallCheck (classCallCheck.js?d225:3)
    at CalendarWithData (CalenderMetaData.jsx?ee20:89)
    at resolveAsyncComponent (vue.esm.js?a026:2461)
    at createComponent (vue.esm.js?a026:4330)
    at _createElement (vue.esm.js?a026:4546)
    at createElement (vue.esm.js?a026:4483)
    at vm._c (vue.esm.js?a026:4615)
    at Proxy.render (eval at ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"690fb1ea-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/components/Calendar/Calendar.vue?vue&type=template&id=89a25360& (24.bc8344237482e96f14d3.hot-update.js:23), <anonymous>:638:17)
    at VueComponent.Vue._render (vue.esm.js?a026:4662)
    at VueComponent.updateComponent (vue.esm.js?a026:2908)
xiaogaofudao commented 4 years ago

@Enigma10 yes i got the same error when i import tree component from ant design. any ideas?

hxgqh commented 3 years ago

The same

hxgqh commented 3 years ago

I added the following into main.js and it worked:

import { VuePlugin } from 'vuera'

Vue.use(VuePlugin)