-
-
Notifications
You must be signed in to change notification settings - Fork 340
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
[v3] Peer dependency conflict using Vue 3 and NPM 7 #1072
Comments
Same issue here with
|
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
Any update on this almost one year on? |
@kiontupper Your suggestion seems good but doesn't work for application using Quasar framework since the Vue package dependency is brought in by Quasar but not the application. |
When will we have the release with the fix? |
This seems to be fixed now, at least with npm 8 there isn't an error when installing vuefire after vue. Let me know if this is still causing a problem but it's worth noting that pinia also faced this issue beacuse it relies on vue-demi but maybe here we can just safely remove vue-demi as both Vue 3 and Vue 2.7 should expose the necessary API |
Reproduction
Step 1: Create a new folder with the following
package.json
:Step 2: Make sure NPM 7 is installed (in my case,
7.10.0
)Step 2:
npm i
Expected behavior
Expected this to install successfully.
Actual behavior
NPM 7 now treats peer dependencies similar to normal dependencies. Specifically, the
@vue/composition-api
peer dependency is incompatible with Vue 3. NPM tries to resolve@vue/composition-api
, resulting in a conflict.Additional information
As far as I can tell, there are two ways to fix this.
Option 1 (IMO the best option)
Move
@vue/composition-api
inpackage.json
from peerDependencies to optionalDependencies. In this case, NPM will try to install@vue/composition-api
if possible (as would be the case for a Vue 2 user), but if it can't, it will proceed without, so Vue 3 users will also be able to proceed.Option 2
The peerDependenciesMeta field can be added to
package.json
. This will prevent NPM from fussing with@vue/composition-api
. It also prevents any warnings from being emitted.The text was updated successfully, but these errors were encountered: