-
Notifications
You must be signed in to change notification settings - Fork 24
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
ERR_UNKNOWN_FILE_EXTENSION running a basic ts file? #36
Comments
Should add, this is within an ESM module where And tsconfig.json for this is:
|
I can confirm that this has been happening to me in a yarn workspace as well, even with EDIT: I found a repeatable way to repro this in yarn 2+ - if for some reason yarn EDIT 2: Turns out, the esm loader is the one that is screwing it up for me. This is what I had to configure in my yarn 2 workspace ( enableGlobalCache: false
pnpEnableEsmLoader: false That made |
I'm getting |
https://github.com/antfu/esno seems to work with ES modules. |
why is it still not solved after half a year |
Yep, I'm using tsx as well now and it's been working great. |
Moved to tsx as well |
Did you find a way to add esbuild configuration using tsx ? (something like |
Also had to migrate away from esbuild-runner, since it produces an 'Unknown file extension ".ts"' error when attempting to run the utility with "type":"module" set in package.json. Per <folke/esbuild-runner#36 (comment)>, switching to the tsx (TypeScript Execute) package fixes the ability to run the utility.
I gave this package a shot today and was immediately greeted with this very issue. I was intrigued as to why there are no signs of this getting fixed after almost 3 years, until I realized this package's latest development was from 2 years ago! I assume this package as unmaintained. |
Not sure what I'm doing wrong but...
helloworld.ts:
The text was updated successfully, but these errors were encountered: