-
Notifications
You must be signed in to change notification settings - Fork 508
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
ts-jest throws TypeError: Cannot read property 'version' of undefined #908
Comments
A workaround is suggested here: kulshekhar/ts-jest#1645 (comment) I ended up doing this:
|
Yea, unfortunately since it's a breaking change upstream, TSDX can't update until its own breaking change. Jest 26 is slated for v0.16.0 since it requires a similarly breaking TS upgrade which requires some new and similarly breaking ESLint and Prettier versions. Also because v0.15.0 is focused on Rollup changes that will introduce enough changes as is. The upstream issue suggests it's a cache issue, so maybe just clearing the cache or re-creating
To clarify for any other readers, the comment linked says that this is an OR condition, not an AND. Per the link, Could also use a |
@PurpleBooth that is a significant misrepresentation of the facts and is quite inaccurate. If that were the case then that would mean all of I'll also mention that passive-aggressive comments are against the CoC. I'm not sure why you felt aggressive against and downvoted my factual comment. I did not state any opinions in my comment and I cannot control how upstream libraries make breaking changes... I have in fact made significant efforts to batch breaking changes so that TSDX users don't feel the impact as much -- I'm not exaggerating when I say there could be a breaking change every week otherwise. I've also spent probably a dozen hours or more reading upstream changelogs (some of which have few details, so I've had to read through commit logs and upstream PRs themselves, and some which leave out certain breakages, e.g. #727 (comment)) to make sure each dependency upgrade is done properly, since it's very easy to accidentally break one command by upgrading another or accidentally releasing something breaking in a non-breaking release (which has happened before). This problem also has at least 3 different workarounds and likely more, as |
Sorry, I was totally in the wrong here. I felt bad about posting that as soon as I did. I hope you accept my apologies. |
Current Behavior
npm run test
fails to run with the error: "TypeError: Cannot read property 'version' of undefined"npm run build
,npm run lint
andtsc --noemit
run without errors.This issue started happening randomly while I was working on some changes. I can't think of anything special that my project is doing, except that I have a linked dependency. Besides this project, I have other TSDX projects that are working fine.
Expected behavior
npm run test
should work.Suggested solution(s)
I haven't been able to solve this myself. This ts-jest issue (kulshekhar/ts-jest#1639) indicates a major version update is required.
Additional context
🤷♂️
Your environment
The text was updated successfully, but these errors were encountered: