Skip to content

Unable to use Tsyringe with tsx #270

@mufasa3000

Description

@mufasa3000

Description
Dependancies are not resolved by Tsyringe when running my node.js app with tsx. It all works well with ts-node.

I assume the issue boils down to the "sensible defaults" of tsx. Any guidence on how to set up the tsconfig to make it work with tsx would be much appreciated.

To Reproduce
Please see my very simple app that demostrates the issue: https://stackblitz.com/edit/node-pv7jyyb1

  • Run with ts-node: npm run start:ts-node (works)
  • Run with tsx: npm run start:tsx (fails)

Expected behavior
DI should work the same with tsx and ts-node

Version: 4.10.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions