-
Notifications
You must be signed in to change notification settings - Fork 258
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
Yarn 2 issues, @vue/test-utils tried to access @vue/compiler-dom #245
Comments
Hi! I have not tried out yarn 2 yet. Can we just add If you want to send a PR, I will do a release this weekend so you can use VTU with yarn 2. |
I am seeing the same issue with npm (I am in a vue2 project):
So I guess @vue/compiler-dom should be added as dependency. Installing it using @lmiller1990 if you think it's correct to add this, I can submit a PR for this. |
Vue 2 was not a monorepo and does not have a @vue/compiler-dom - have you got the right version of test utils? test-utils v1 is for Vue 2, test-utils v2 is for Vue 3 (confusing, yes - Vue 1 never had any testing utils, so that's why). Either way if it is as simple as adding the dependency here, please go for it! yarn 2 compat would be great. |
Ok, I think I was getting confused with the versioning. My fault, sorry. Anyway, as I'm on Vue 2, it definitely does not relate to here. So I think in my case it was just a misconfiguration by myself. Therefore I would also not just add the dependency as I wrote above. |
also seeing this in a yarn monorepo setup |
I am using this in Cypress yarn monorepo and it's working fine for me there. We should fix the yarn 2 issue first, and figure out if there are any other issues (yarn 1, etc) elsewhere. Thanks for the PR @shayneo, any chance you can confirm it's working in yarn 2? |
The issue is still there with yarn version 3.3.1 and @vue/test-utils 2.2.6
Looks like it is not fully compatible with yarn plug and play as described in yarn docs. Switching to pnp loose option seems to work around the issue. My env: yarn 3.3.1 ├─ @rushstack/eslint-patch@npm:1.2.0 |
@vue/compiler-dom
is not listed as a dependency which causes Yarn 2 to break.https://github.com/vuejs/vue-test-utils-next/blob/8a1f348969ffadfe1b35de746f0c27c020ee074c/src/utils/compileSlots.ts#L1
Temporary solution:
The text was updated successfully, but these errors were encountered: