Skip to content

ts-node with shebang vs ts-node-script #1186

Answered by blakeembrey
ron23 asked this question in Q&A
Discussion options

You must be logged in to vote

It sounds like some confusion around the shebang rather than ts-node. If I’m understanding the question correctly, you expected ts-node x.ts to automatically use the shebang? When running something with ts-node (or node) it doesn’t use the shebang anymore, it’s a feature of your Unix environment rather than the programming language.

To have your environment use the shebang, you’d invoke the script without node. For example, just do ./shebang.ts.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ron23
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants