Skip to content
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

Vue Demi dependency broken #2403

Closed
ESP-Marc opened this issue Sep 7, 2023 · 2 comments
Closed

Vue Demi dependency broken #2403

ESP-Marc opened this issue Sep 7, 2023 · 2 comments

Comments

@ESP-Marc
Copy link

ESP-Marc commented Sep 7, 2023

Reproduction

Can't reproduce with CDN assets

Steps to reproduce the bug

Install Pinia on a Vue 2.7 project and run it

Expected behavior

Build/serve without error

Actual behavior

Builds with an error relating to vueuse/vue-demi

The requested module 'vue-demi' does not provide an export named 'hasInjectionContext'

Additional information

I have raised an issue with Vue Demi Lib here: vueuse/vue-demi#244

I just wanted to make the Pinia community here aware of this bizarre issue that has just cropped up in in the last few days where [email protected] is not working for my team with Pinia on Vue 2.7 and when we try force [email protected] that we know has been working fine for the past few months since May where [email protected] has consumed that particular version of Demi .5 up-until this week just fine, it has suddenly started to fail with same issue as .6 release this week.

As I have outlined in the linked issue in the other lib, I believe [email protected] has been overwritten by accident as I have two totally different copies of the same version of this dependency?

Copy link
Member

posva commented Sep 7, 2023

Maybe you need to use pnpm dedupe after updating Vue-Demi but in my tests it works

@posva posva closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2023
@ESP-Marc
Copy link
Author

ESP-Marc commented Sep 8, 2023

@posva Fraid not, no dupes reported at all

Let me reiterate:
11 Days ago vue-demi released version 0.14.6 < This version is broken for us because its Vue version detection is not working, it loads Vue 3 /lib/v3/ compatibility files in our Vue 2.7 project instead of from /lib/v2.7/.

So to fix this, I tried forcing Pinia to consume 0.14.5 that I know has been working since the middle of May this year by using resoltions.

  "resolutions": {
    "vue-demi": "0.14.5"
  }

However much to my surprise, this did not work when I confirmed my node_modules directory had 0.14.5 in it for deffinate, I was puzzled when I got the same error in 0.14.5 as I do with 0.14.6.
When I investigated this, I found that my old copy of 0.14.5 from another Pina project is totally different from the 0.14.5 I downloaded this week in a fresh clone.

To be absolutely clear, 0.14.5 is not the same as it was a few months ago when it was originally npm published:

same-version-different-dates

The package.json in the old copy (left) vs recent copy (right) both sate in the file the same version:

  "name": "vue-demi",
  "version": "0.14.5",

guergana added a commit to wmde/wikidata-mismatch-finder that referenced this issue Oct 12, 2023
guergana added a commit to wmde/wikidata-mismatch-finder that referenced this issue Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants