TypeStrong / ts-node

TypeScript execution and REPL for node.js
https://typestrong.org/ts-node
MIT License
12.92k stars 532 forks source link

How funny a ts-node that does not read .ts file hahahha #2120

Closed allestaire closed 5 months ago

allestaire commented 5 months ago

Search Terms

yarn ts-node script.ts

returns

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for

And the configuration is too confusing when the content of the file is only console.log hahahahaha what kind of package is this. hahahaha

This package is much better tsx

Expected Behavior

Actual Behavior

Steps to reproduce the problem

Minimal reproduction

Specifications

jakesteele commented 5 months ago

TS-Node doesn't work when your package type is "module" switch to commonJS and that error will go away :D

allestaire commented 5 months ago

TS-Node doesn't work when your package type is "module" switch to commonJS and that error will go away :D

Already tried that. the thing is, TS-Node might be hard to configure, good thing I found the easier one