Search Terms
Expected Behavior
- SWC since version 1.8.0 (2024-11-04) supports ES2023 and ES2024
- Once using
ts-node with swc having a target equals to ES2023 or ES2024 the application should execute correctly
Actual Behavior
- The application fails with error:
return bindings.transformSync(isModule ? JSON.stringify(src) : src, isModule, toBuffer(newOptions));
^
Error: x jsc.target should be es5 or upper to use getter / setter
Steps to reproduce the problem
In a project using ts-node with swc set the target to ES2023 or ES2024 and it will fail. Once you set the target as ES2022 the project work as expected.
Minimal reproduction
Same as above
Specifications
- ts-node version: 10.9.2
- node version: 22.15.0
- TypeScript version: 5.8.3
- tsconfig.json, if you're using one:
- Operating system and version:
- If Windows, are you using WSL or WSL2?:
Search Terms
Expected Behavior
ts-nodewithswchaving a target equals to ES2023 or ES2024 the application should execute correctlyActual Behavior
Steps to reproduce the problem
In a project using
ts-nodewithswcset the target to ES2023 or ES2024 and it will fail. Once you set the target as ES2022 the project work as expected.Minimal reproduction
Same as above
Specifications