-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Bug]: Declare ts-node as dependency of jest-config #14752
Comments
Hey @yohny
Should work as expected. |
yes, the docs mention 2 alternatives - babel and ts-jest (not ts-node), but for babel case it is only mentioned to install |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
ping, to prevent stale bot from closing |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
ping, to prevent stale bot from closing |
If someone needs a temporary workaround using packageExtensions: {
jest-config@29.7.0: {
dependencies: {
ts-node: ">=9.0.0"
}
}
} After adding the file, run I faced this issue with Jest v29.7.0. I've assumed Once this is fixed in Jest's future release, the P.S.: Possibly, your first thought would be to use References: Learnt this when I faced a similar issue with Astro here. Hope this helps! |
@SimenB shouldn't |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
ping to prevent stale bot from closing |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
ping, to prevent stale bot from closing |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
ping, to prevent stale bot from closing |
We have recently added support for We're also considering not using |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version
29.7.0
Steps to reproduce
When you have a new project with Jest set up as testing framework and you are using a typescript configuration files you get following error when launching jest tests:
Expected behavior
Threre should be no error as typescript configuration is supported according to docs. So expected behaviour is that
ts-node
should be declared as peerDependency of jest-config. Oncets-node
is installed alll works as expected.Actual behavior
You get error above when running jest tests using typescript configuration, because ts-node is not declared as dependency of jest-config (its only in devDependencies of jest-config).
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: