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

Could not install it with vue3 project #2200

Closed
HomyeeKing opened this issue Dec 11, 2020 · 13 comments
Closed

Could not install it with vue3 project #2200

HomyeeKing opened this issue Dec 11, 2020 · 13 comments

Comments

@HomyeeKing
Copy link

🐛 Bug Report

To Reproduce

Steps to reproduce the behavior:

Expected behavior

Link to repo (highly encouraged)

Debug log:

# content of ts-jest.log :

**error** An unexpected error occurred: "could not find a copy of ts-jest to link in  XXXX/node_modules/vue-jest/node_modules".

envinfo

System:
    OS:
    Node version:

Npm packages:
    jest:
    ts-jest:
    typescript:
    babel(optional):
@HomyeeKing HomyeeKing added Bug Report Needs Repo Need a minimium repository to reproduce the problem Needs Triage labels Dec 11, 2020
@HomyeeKing
Copy link
Author

add successfully by specfying the version, linked issue is here

@ahnpnl
Copy link
Collaborator

ahnpnl commented Dec 11, 2020

This looks like related to specific workspace type. The error points to vue-jest. Any ideas @lmiller1990 ?

@lmiller1990
Copy link

Can you share a repo? Currently vue-jest@5.x requires ts-jest, even if you are not using TypeScript. This will be fixed in the next release for vue-jest.

@ahnpnl ahnpnl added Upstream Bug and removed Bug Report Needs Repo Need a minimium repository to reproduce the problem Needs Triage labels Dec 11, 2020
@HomyeeKing
Copy link
Author

@lmiller1990 it was found by a private repo with tsx in whole project and yarn as package manager ,I think I've found problem, it seems something wrong with yarn, I start two new projects, one is using npm , another using yarn, the npm one works fine, but the yarn one happens the same issue , here is the repo

@HomyeeKing
Copy link
Author

@lmiller1990 any progress there 👀

@lmiller1990
Copy link

I pulled the repository and ran yarn install then I ran yarn test:unit and the test passed. What am I supposed to be seeing?

@HomyeeKing
Copy link
Author

@lmiller1990 install ts-jest failed , try yarn add ts-jest

@HomyeeKing
Copy link
Author

HomyeeKing commented Dec 24, 2020

@lmiller1990 I tried installing it by yarn just now , it works, maybe you can close this issue,
by the way, is it fixed by yarn ?

@zmcNotafraid
Copy link

@lmiller1990 I tried installing it by yarn just now , it works, maybe you can close this issue,
by the way, is it fixed by yarn ?

Which yarn version are you using? My yarn version is 1.22.5 and I still can't install ts-jest

@HomyeeKing
Copy link
Author

@zmcNotafraid em.. @1.22.10 kind of strange

I test it again at where I found this issue , it still not work, this repo still not work either
the repo I just tested is a yarn repo which already have vue-test, it works and I have no idea why, so strange ...

it seems have not been fixed

@zmcNotafraid
Copy link

zmcNotafraid commented Dec 24, 2020

ts-jest has conflict with vue-jest@5.x. When I switch to vue-jest@3.x, ts-jest can install


Update:
I test with ts-jest@25.x and ts-jest@27.x and they are all worked. But ts-jest@26.x can't install.

@lmiller1990
Copy link

lmiller1990 commented Dec 24, 2020

vue-jest@5.x and vue-jest@3.x are entirely different projects. 3.x is not maintained, you want 4.x (for Vue 2). 5.x is for Vue 3. Yes, this is confusing, but I don't see a better way to version 🤔

I am not entirely sure why ts-jest 25.x and 27.x are okay and 26.x is not. 🤔

@HomyeeKing
Copy link
Author

the related issue has been closed yarnpkg/yarn#6285 (comment)
seems it has been fixed in yarn v2

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

No branches or pull requests

4 participants