-
Notifications
You must be signed in to change notification settings - Fork 309
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
ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/ts-jest-transformer' is not defined by "exports". #941
Comments
Hi, would you please try to clear jest cache? If that doesn’t work, pls provide your repo :) |
Hello @ahnpnl , I removed the cache from jest but still giving the same error. Saddly the repo is private and I cannot provide it. |
would you please check what is the version of If it is a private repo, would you please make a separate dummy repo to reproduce the issue? |
ts-jest version is 27.0.2. |
Does removing Are you using nrwl nx or using angular-builder/jest? did you finish all the migrations mentioned in I have a sample repo here https://github.com/ahnpnl/jest-angular but I cannot reproduce your problem. |
I have the same problem. After upgrading to the newest version, I get I'm using Windows & Angular 11.2.13, no nrwl. As a temporary fix, I can change the content of
to
Then it works. So it seems like the wildcard export is not correctly resolved. But I don't know why the example project works fine. Spoiler: My Files
|
Are you using |
I'm using npm 6.14.4 and updated with |
Do you have a repo which can be always producible? |
Had the same issue - turned out to be node version problem - had run with Node v14.6. Hope that helps somebody. Edit: switching to v14.16.x fixed it. |
I suppose Node 12.22.1 will also work. |
My Node version is 12.18.0. |
@ferreria23 would you please try with Node 12.22.1? I see from NodeJs doc mentioned https://nodejs.org/api/packages.html#packages_subpath_patterns was added in 12.20.0 |
I also had node 12.18.0 installed. After upgrading to 14.17.0 (latest lts) it works fine. Thank you for your help! |
I will bring this up to Strange that my work uses Node 12.14 can still run, probably cache on CI server. |
Confirmed that Node < 12.20.0 will get this issue. I could reproduce by switching GitHub action to Node 12.18.0 https://github.com/ahnpnl/jest-preset-angular/runs/2736935738?check_suite_focus=true |
I have the same issue, while updating from "jest-preset-angular": "7.1.1" to "jest-preset-angular": "^9.0.1". |
Node 12.20.0+ or 14.13.0+, see https://nodejs.org/api/packages.html#packages_subpath_patterns |
I have the same issue on my windows with NodeJS 12.18.3 for a new Angular project, after upgrade to the latest node version, it worked just fine. |
fix in 9.0.2 |
🐛 Bug Report
To Reproduce
Steps to reproduce the behavior:
Just upgrade from jest-present-angular 8.3.1 to 9.0.1 and now I cannot run tests.
Expected behavior
The tests should run.
Link to repo (highly encouraged)
Error log:
envinfo
The text was updated successfully, but these errors were encountered: