Skip to content

Use shebang if installing locally? #639

Closed
@Taytay

Description

@Taytay

I just discovered that shebang support wasn't working on my build machine because I have installed ts-node locally, and then was running the .ts file with a shebang like: #!/usr/bin/env ts-node as referenced in #73

That works if you have ts-node installed globally, or if you have it installed locally, and have ./node_modules/.bin on your path, but if you don't have node_modules/.bin on your path, it doesn't appear to work, and this makes sense. My current workaround would be to rely upon npx and use the shebang #!npx ts-node, since npx is installed with ts-node. I just wanted to make sure I'm not missing anything since #73 claims that the /usr/bin/env shebang should "just work".

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionSupport requests. We tend not to answer these on Github. Nowadays I convert to Discussion instead.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions