privatenumber / tsx

⚡️ TypeScript Execute | The easiest way to run TypeScript in Node.js
https://tsx.is
MIT License
8.64k stars 132 forks source link

tsx can't run code with endent #533

Closed nicroto closed 2 months ago

nicroto commented 2 months ago

Acknowledgements

Minimal reproduction URL

https://gist.github.com/nicroto/a2c73922a5e8f83d7673212104fd22a6

Version

v4.7.2

Node.js version

v21.7.1

Package manager

npm

Operating system

macOS

Problem & expected behavior (under 200 words)

What happened

What I expected

Error stack trace

TypeError: endent is not a function
    at main (test.ts:9:15)
    at <anonymous> (test.ts:12:1)
    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
    at async loadESM (node:internal/process/esm_loader:28:7)
    at async handleMainPromise (node:internal/modules/run_main:120:12)

Contributions

nicroto commented 2 months ago

I've also posted a question in SO: https://stackoverflow.com/questions/78357468/is-there-a-way-to-run-tsx-with-endent-and-similar-tagged-template-literals

nicroto commented 2 months ago

@privatenumber does the example I gave not reproduce the issue on your end?

privatenumber commented 2 months ago

I haven't tried. Please use the reproduction guidelines in the issue template.