sindresorhus / meow

🐈 CLI app helper
MIT License
3.53k stars 150 forks source link

Incompatibility with ts-node #188

Closed QuentinRoy closed 3 years ago

QuentinRoy commented 3 years ago

I could not find a way to make v10 to work with ts-node and had to revert to v9.

I went through this, then this, but when following the later, import.meta does not exist anymore. I could not find any other solution. This is possibly a ts-node issue rather than a meow issue, albeit it may be worth mentioning it somewhere and save hours to anyone like me trying to make it work.

cspotcode commented 3 years ago

Seems to work well. https://github.com/TypeStrong/ts-node-repros/tree/meow-188 https://github.com/TypeStrong/ts-node-repros/runs/2943187328

You can compare the example I have linked above to your own code. Perhaps you misconfigured something.

QuentinRoy commented 3 years ago

Thank you! I finally made it work. I am not sure what did not work before, but I think it is because I use "module": "system" (does not work), and did not add the .js extension when importing local modules.