-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ts-node is not running sub-command #955
Comments
Nice complete reproduction example, thanks. Technical detail. Checking what node sees in
Commander passes on
I wonder if we should be spawning |
I think a work-around is to use node as the executable: $ node -r ts-node/register sm.ts orient compress
SM-ORIENT.ts The |
Yes, it works, but the problem for me is I need to pass the location of custom You can do it like this: And I can't find the way to make it with |
Getting messier especially for cross-platform, but you could define Mentioned under: |
So true, I just didn't read the docs carefully enough and just learned new thing :) Now it works with this "start": "TS_NODE_PROJECT=mytsconfig.json node -r ts-node/register sm.ts" So now the workaround is fully functional. But if the issue is to hard to fix, the typescript configuration, and the workaround should at least be added to the documentation. Thanks for your help. |
Note to self. Still wondering if we are spawning child process correctly in complex cases... I added execPath to debugging, and think process.foo are self-consistent.
Can add script to execPath and execArg...
|
Added TypeScript tips in README. Hopefully that helps. |
ts-node
is running the first command correctlybut the
sub-command
gives empty output, nothing happensnpm run start
gives the help as expectednpm run start orient
gives empty resultsIf i change the files back to
.js
and run it with node it works as expected./package.json
./sm.ts
./sm-orient.ts
./tsconfig.json
I'm using Ubuntu Windows Linux Subsystem on Windows 10
node version: v10.15.1
The text was updated successfully, but these errors were encountered: