Closed Henrycheheng closed 7 months ago
The dependencies and configurations are shown below
I've figured out what's wrong with this. If you put "type": "module" in package.json, it will give you this error, So nodemon could currently only run ts files under the commonjs modular specification?
The observation I made was that the node code failed to validate the .ts file, resulting in an error being thrown.
Not sure if this is nodemon or something else (I don't regularly use TS and when I do, it's typically with Deno, so I don't have all the tooling to mess with).
The file you've included a screenshot at the end, that's not from nodemon is it?
Not sure if this a documentation issue or something else can be done… happy to take advice.
Thank you for your reply. My last screenshot is indeed not an error caused by nodemon. In fact, node itself does not support ts files under esm. Thank you very much for your advice, I will give deno a try. Thank you again for your help,I have no more questions and I will close this issue soon.
i remember a time when nodemon could run ts files,but today i use pnpm init a project, and tsc --init, and then execute an index.ts demo error as follows, how can I run ts file in nodemon![image](https://github.com/remy/nodemon/assets/48849602/7aef3a95-b0f5-47a4-b438-6d023914d0af)