-
-
Notifications
You must be signed in to change notification settings - Fork 168
NPM7: Incorrect detection of Vue version #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@gerardnll Which package manager you are using? Can you try to run |
I'm using NPM. where am I supposed to run 'npx vue-demi-fix'? because executing that line in my project root throws:
|
What was weird. Did you bump the version of Vue from 2 to 3 after installing |
Can you share a minimal reproduction? It seems to work fine on my Vue 2 and Vue 3 projects. |
OK. But first, please, correct me if I'm wrong but, when I do
and the content of
Is that how it's supposed to look? |
I had to downgrade npm. But now, this warning appears and there's no longer this file I think NPM changed some things with version 7. Take a look at this document in the section 'Breaking changes' I think there's some breaking things that this package is using, like 'require' and maybe even this affects. Looks like with NPM 7 I had the dependencies of @vueuse inside and now I have them in the root node_modules/ that combined with the things pointed above may be one of the reasons the package functionality breaks. |
@gerardnll I see. I have heard that npm 7 will install the peerDepenencies automatically. I will have a look at this to see if we can come up with a solution. Thanks. |
Thanks! Ping me if you need some help testing. |
I have released v0.4.3 and it should work for npm 7. Please give a try. |
Yes. Looks like it's working on my main project (where I do the compiling). Great! |
Hi, I was trying to use @vueuse/core when I ran into an issue with this package. I'm using npm 7.0.3, node 15.0.1 and my package.json looks like this:
I'm using Laravel Mix to compile all the assets (I'll be using Laravel as a backend). Everything was going fine until I tried to use any function from the vueuse package.
The console error looked like this:
Going thru the module code I see some lines are overwritten depending of the Vue version and it looks like the module thinks I'm on version 2 of Vue. Manually changing those lines to the 'v3' fixed the issue. I'm not sure this is Laravel Mix fault (webpack wrapper) or not. Let me know how can I help fixing this issue.
The text was updated successfully, but these errors were encountered: