When you run scripts written in TypeScript with ts-nodeprocess.argv looks like
[
'/path/to/project-root/node_modules/ts-node/dist/bin.js',
'/path/to/project-root/path/to/script-name.ts',
// ... all other cli args here
]
In 1.x version it was parsed correctly, but since 2.0 it throws bin.js: error: unrecognized arguments: /path/to/project-root/path/to/script-name.ts. Probably the issue is somewhere here, because the first arg isn't process.execPath. I'm not sure whether it's ts-node's issue, please let me know if it is so.
When you run scripts written in TypeScript with
ts-node
process.argv
looks likeIn 1.x version it was parsed correctly, but since 2.0 it throws
bin.js: error: unrecognized arguments: /path/to/project-root/path/to/script-name.ts
. Probably the issue is somewhere here, because the first arg isn'tprocess.execPath
. I'm not sure whether it'sts-node
's issue, please let me know if it is so.