Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This package doesn't work with NestJS #199

Closed
1 task
8naf opened this issue Mar 14, 2023 · 4 comments
Closed
1 task

This package doesn't work with NestJS #199

8naf opened this issue Mar 14, 2023 · 4 comments
Labels
bug Something isn't working outdated pending triage

Comments

@8naf
Copy link

8naf commented Mar 14, 2023

Bug description

I am using this package to compile my NestJS project. The compilation process is successful, but when running the application, it throws an error.
I'm not sure if this issue is caused by NestJS or tsx, so I tried compiling my project with ts-node and tsc, and everything worked fine. That's why I decided to create the issue here.

Reproduction

This is the reproduction.

Run the start:tsx script and access localhost:3000, the terminal will log an error: Cannot read properties of undefined (reading 'get').
You can run the start:ts-node or start:tsc script and access localhost:3000 to see that the application does not have any errors.

Environment

System:
    OS: Windows 10 10.0.19045
    CPU: (4) x64 Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz
    Memory: 1.10 GB / 7.84 GB
  Binaries:
    Node: 19.7.0 - ~\AppData\Local\fnm_multishells\13768_1678794319159\node.EXE
    npm: 9.5.0 - ~\AppData\Local\fnm_multishells\13768_1678794319159\npm.CMD   
  npmPackages:
    tsx: ^3.12.5 => 3.12.5

Can you work on a fix?

  • I’m interested in opening a pull request to address this issue.
@8naf 8naf added bug Something isn't working pending triage labels Mar 14, 2023
@privatenumber
Copy link
Owner

I haven't looked into it extensively, but it looks like your code is using decorators.

esbuild doesn't support decorators:

@8naf
Copy link
Author

8naf commented Mar 14, 2023

Sorry for not reading the readme file carefully.

This package is really great as it supports TS + ESM + tsconfigs paths altogether. It's a pity that it's facing this limitation. Maybe I'll look for another solution.

I will close this issue for now and reopen it when esbuild supports decorators.

@8naf 8naf closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2023
@8naf
Copy link
Author

8naf commented Mar 15, 2023

The issue has been resolved here.

@8naf 8naf closed this as completed Mar 15, 2023
@privatenumber
Copy link
Owner

Nice, thanks for sharing the workaround!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working outdated pending triage
Projects
None yet
Development

No branches or pull requests

2 participants