Run the below commands and install the required packages globally: npm install -g ts-node typescript '@types/node' Now run the following command to execute a typescript file: ts-node typescript-file.ts