[BUG] SWC preset generates project with TypeScript 7 incompatible with @swc-node/register

Open
#616 3 comments 0 reactions 1 assignee View on GitHub

@Romakita is already working on this.

Since Oct 7, 2026.

Assessment

This issue has not been assessed yet.

Description

blocker

Information

  • Version: @tsed/cli 7.8.0
  • Node.js: v24.18.0
  • npm: current npm bundled with Node.js 24
  • OS: Linux

Packages generated by the Ts.ED CLI include:

typescript@^7.0.2
@swc-node/register@^1.12.1

When creating a new project with the Node.js + SWC preset, the generated dependency set is not installable cleanly because @swc-node/[email protected] declares:

peer typescript >=4.3 <7

Example

After generating a fresh project, running:

npm install

fails with:

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree

npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/typescript
npm error   typescript@"^7.0.2" from the root project

npm error Could not resolve dependency:
npm error peer typescript@">= 4.3 < 7" from @swc-node/[email protected]
npm error node_modules/@swc-node/register
npm error   @swc-node/register@"^1.12.1" from the root project

If the dependency conflict is bypassed and the application is started anyway, it fails at runtime:

TypeError: Cannot read properties of undefined (reading 'Js')
    at Object.<anonymous> (.../node_modules/@swc-node/register/transform-cache.ts:18:53)

This appears to be the same incompatibility already indicated by the peer dependency constraint.

Expected behavior

A freshly generated project using the Node.js + SWC preset should install and start without dependency conflicts.

The generator should either:

  • use a TypeScript version supported by @swc-node/register, or
  • use an @swc-node/register version that supports TypeScript 7.

Acceptance criteria

  • A project generated with the Node.js + SWC preset installs successfully with npm install.
  • No peer dependency conflict exists between TypeScript and @swc-node/register.
  • npm start runs successfully with the generated dependency versions.
Dominant language
TypeScript
Stars
43
Forks
25
Avg merge
15m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tsedio/tsed-cli

All issues in tsedio/tsed-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.