Repository navigation
Ts-node Unable to run single line TS Prgramme #2142
Replies: 2 comments
|
The |
|
Your VS Code screenshot already has lowercase For this standalone CommonJS example, put a {
"compilerOptions": {
"module": "CommonJS"
}
}Keep the source as: console.log("Hello World");Then, from that folder, run: ts-node Session1.tsIf you added a I reproduced the exact If it still fails, run these from the same folder and share their output: ts-node -vv
ts-node --showConfigThey show the actual TypeScript version and effective configuration, including any inherited config, as documented in Troubleshooting. That helps distinguish a different setup from the reproduced case. |
Uh oh!
There was an error while loading. Please reload this page.
I am a newbie in TS & want to run a single line programme directly without tanspiling via ts-node

These are my specs
I ran below command
This is my code
I am getting below error
I am not doing any import nothing, I think it should work without package.json file and even after adding package.json file the problem still persists....Please help me with this.
Thank You
All reactions