Skip to content

[BUG] Freshly generated projects are not installable with npm due to incompatible dependencies #617

Open

Description

@vrilcode

Information

  • @tsed/cli: 7.8.0
  • Ts.ED: 8.43.1
  • Node.js: v24.18.0
  • npm: 11.16.0
  • OS: Linux

Problem

A freshly generated Ts.ED project cannot be installed and started successfully with npm without manually correcting multiple generated dependency versions.

This does not appear to be a single isolated dependency issue. Fixing one generated incompatibility exposes the next one.

Examples encountered in a freshly generated project:

1. TypeScript / SWC incompatibility

Generated dependencies:

typescript@7.0.2
@swc-node/register@1.12.1

However:

@swc-node/register@1.12.1
peerDependency: typescript >=4.3 <7

This causes npm install to fail with ERESOLVE.

If the peer dependency conflict is bypassed, the application later fails at runtime with:

TypeError: Cannot read properties of undefined (reading 'Js')

2. dotenv incompatibility

Generated project:

dotenv@18.0.6
@tsed/config@8.43.1

But:

@tsed/config@8.43.1
peerOptional dotenv ^16.5.0

3. dotenv-expand incompatibility

Generated project:

dotenv-expand@1000.0.0
@tsed/config@8.43.1

But:

@tsed/config@8.43.1
peerOptional dotenv-expand ^12.0.2

4. js-yaml incompatibility

Generated project:

js-yaml@5.4.3
@tsed/config@8.43.1

But:

@tsed/config@8.43.1
peerOptional js-yaml ^4.1.0

Each of these causes npm dependency resolution to fail.

Expected behavior

A freshly generated project using standard CLI options should:

  1. generate successfully,
  2. install successfully with npm,
  3. contain internally compatible dependency versions,
  4. start successfully without requiring --force, --legacy-peer-deps, or manual dependency downgrades.

Suggested improvement

It may be worth adding an end-to-end or release smoke test against the actually published CLI package:

install published @tsed/cli
→ generate project
→ npm install
→ npm start

This would catch cases where the templates themselves are syntactically valid, but the generated dependency set is not installable.

Acceptance criteria

  • A freshly generated project installs successfully with npm 11.
  • Generated dependency versions satisfy all peer dependency requirements.
  • A generated project starts successfully without manual dependency changes.
  • Standard CLI presets are covered by an installation/start smoke test.

Activity

  1. Romakita commented on Oct 8, 2026

    @Romakita
    Contributor

    Hi @vrilcode

    I'll fix peer dep on tsed framework level to solve that.

    But I recommend you to use vite preset instead swc.

    See you

  2. added theissue type on Oct 8, 2026
  3. Romakita commented on Oct 8, 2026

    @Romakita
    Contributor

    This PR should solve peer dependencies issue : tsedio/tsed#3476

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions