Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ndcunningham
Copy link
Contributor

Current Behavior

Jest fails to parse TypeScript config files with ES module syntax on Node.js 24 with error:

Error: Jest: Failed to parse the TypeScript config file
SyntaxError: Unexpected token 'export'

Expected Behavior

Jest should successfully parse TypeScript config files on Node.js 24.

Related Issue(s)

This occurs because Jest 30 + Node.js 24 can't parse TS configs with imports without the --no-experimental-strip-types flag.

Related to: jestjs/jest#15682

Jest 30 + Node.js 24 can't parse TS configs with imports without the
--no-experimental-strip-types flag. This change automatically adds the
flag when running Jest tests on Node.js 24+.

Fixes the issue where Jest fails to parse TypeScript config files with
ES module syntax on Node.js 24.

Related to: jestjs/jest#15682
@ndcunningham ndcunningham requested a review from a team as a code owner July 31, 2025 18:28
@ndcunningham ndcunningham requested a review from JamesHenry July 31, 2025 18:28
@vercel
Copy link

vercel bot commented Jul 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Jul 31, 2025 6:39pm

@ndcunningham ndcunningham self-assigned this Jul 31, 2025
@nx-cloud
Copy link
Contributor

nx-cloud bot commented Jul 31, 2025

View your CI Pipeline Execution ↗ for commit 0d76f70

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 24m 35s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m 50s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 5s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 5s View ↗
nx documentation ✅ Succeeded 26s View ↗

☁️ Nx Cloud last updated this comment at 2025-07-31 18:58:10 UTC

@ndcunningham ndcunningham enabled auto-merge (squash) July 31, 2025 18:58
@ndcunningham ndcunningham merged commit bf67560 into master Jul 31, 2025
6 checks passed
@ndcunningham ndcunningham deleted the fix/jest-node24-experimental-strip-types branch July 31, 2025 18:58
jaysoo pushed a commit that referenced this pull request Aug 1, 2025
)

## Current Behavior

Jest fails to parse TypeScript config files with ES module syntax on
Node.js 24 with error:
```
Error: Jest: Failed to parse the TypeScript config file
SyntaxError: Unexpected token 'export'
```

## Expected Behavior

Jest should successfully parse TypeScript config files on Node.js 24.

## Related Issue(s)

This occurs because Jest 30 + Node.js 24 can't parse TS configs with
imports without the `--no-experimental-strip-types` flag.

Related to: jestjs/jest#15682
ndcunningham added a commit that referenced this pull request Aug 1, 2025
)

## Current Behavior

Jest fails to parse TypeScript config files with ES module syntax on
Node.js 24 with error:
```
Error: Jest: Failed to parse the TypeScript config file
SyntaxError: Unexpected token 'export'
```

## Expected Behavior

Jest should successfully parse TypeScript config files on Node.js 24.

## Related Issue(s)

This occurs because Jest 30 + Node.js 24 can't parse TS configs with
imports without the `--no-experimental-strip-types` flag.

Related to: jestjs/jest#15682
@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2025

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants