xxxxxxxxxx
if you are trying to execute the code in the terminal. For windows device. You need to use,
one of this command lines depending on what is installed on your system.
npx ts-node filename.ts
npm ts-node filename.ts
And it will work just like magic.
Hope it helped you.
xxxxxxxxxx
you need to install ts-node globally
npm uninstall -g ts-node
npm install -g ts-node
This works!
xxxxxxxxxx
npm install ts-node --save-dev