[BUG] SWC preset generates project with TypeScript 7 incompatible with @swc-node/register
@Romakita đang làm issue này rồi.
Từ ngày 7/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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/registerversion 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 startruns successfully with the generated dependency versions.
- Ngôn ngữ chính
- TypeScript
- Star
- 43
- Fork
- 25
- Merge trung bình
- 15 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của tsedio/tsed-cli
-
[FEAT] Add MikroOrm pluginCó thể làm lại được @derevnjuk đã nhận 1607 ngày trước và không có pull request nào đang mở. Đang mởenhancement good first issue pinned
tsedio/tsed-cli#257 · 1 bình luận · 2 reaction · 2 người được giao ·
Tất cả issue của tsedio/tsed-cli
Issue tương tự
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 64/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
ranxianglei/billion-context#7860 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
agent-oc-find-bugs api complexity → simple payment-methods recurring contributions reviewed stripe
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
opencollective/opencollective#9177 ·