Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

TypeError: Vue is not a constructor #155

Open
HelenLyuRey opened this issue Apr 3, 2022 · 3 comments
Open

TypeError: Vue is not a constructor #155

HelenLyuRey opened this issue Apr 3, 2022 · 3 comments

Comments

@HelenLyuRey
Copy link

Hi

I did the step exactly like what's written in readme, but I got errors using either way for Vue in React in my project.

  1. The way "without the Babel plugin" -- using VueWrapper , I got the error which seems like an internal issue since the error comes from vuera.cjs.js.
TypeError: Vue is not a constructor
createVueInstance
node_modules/vuera/dist/vuera.cjs.js:258
  1. The way "with Babel" (I set up Babel and use the component name without the wrapper), I got this error (Counter is my component name).
InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('/static/media/Counter.c2c39f22.vue') is not a valid name.
▶ 14 stack frames were collapsed.
Module.<anonymous>
src/index.js:12 

I don't understand why they result in different errors and how should I solve them? It's been bugging me for a few days and I'm not sure where I did wrong.

Thanks

@EmmS21
Copy link

EmmS21 commented Apr 10, 2022

Having the same issue, hoping someone responds soon

1 similar comment
@cxgreat2014
Copy link

Having the same issue, hoping someone responds soon

@HelenLyuRey
Copy link
Author

I realized afterwards that I got this error because I'm using Vue3 and this library only support Vue2. Check your Vue version, if you are using Vue3, use veaury library instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants