-
-
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
feat: add TypeScript to default execPath #1552
Conversation
`ts-node` is the standard for running typescript node programs on development mode. Adding this line will enable everyone with a `tsconfig.json` to have a full-refresh server watching experience. (:
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
Not stale.
…On Wed, 24 Apr 2019, 18:51 stale[bot], ***@***.***> wrote:
This issue has been automatically marked as idle and stale because it
hasn't had any recent activity. It will be automtically closed if no
further activity occurs. If you think this is wrong, or the problem still
persists, just pop a reply in the comments and @remy
<https://github.com/remy> will (try!) to follow up.
Thank you for contributing <3
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1552 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAADLBBHHLQZTKD7CWC4N73PSCMZ5ANCNFSM4HE7K6RQ>
.
|
It's nice but in my opinion it's inconsistent with node.
After my last npm upgrade it took me a while to figure out nodemon was the one to blame and that I had to remove my register argument. |
@teebot hmm, this seems rather important. Can you raise a separate issue (allowing others to find the problem). It seems like we'll either need to be smart about adding ts support or removing it… |
Sure thing I created #1564 |
Well, this pull request explains why now I'm getting |
sorry guys, my bad.
I didn't knew people were running |
No worries! Yes I dabbled with transpiling but in the end The require hook
was also fine and requiring less build steps (granted startup time is a
little longer)
…On Mon, 6 May 2019 at 19:50, Leonardo Dino ***@***.***> wrote:
sorry guys, my bad.
You still use node -r ts-node/register app.ts in production.
I didn't knew people were running ts-node in production, I always compile
first and use it only for development.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1552 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AALJZS5E23GT2UQYNZFZ6ATPUBVWRANCNFSM4HE7K6RQ>
.
|
as of the last release, you can now replace: and I think the equivalent for custom node options will be overriding the "scripts": {
"ts-node": "node -r ts-node/register",
// ...other scripts
} (haven't tested this last one, but I think it can work) |
I've solved my issue by overriding executable for "ts" files back to |
Good one @mefcorvi (: Sorry for causing trouble. I think we agree that having I agree that it should be documented somewhere, especially as it's a recent change in a long-running project. |
can this either be properly documented or reverted? it cost me several hours to figure out why changing from: the ultimate reason is, that ts-node will be executed twice now and the 2nd one (from the cmd flag another solution would be to check the arguments, when using implicit |
@remy this broke lots of existing codebases that use |
@HosseinAgha I raised another issues god knows when, saying that as I don't use typescript I really don't know what the right way of handling or fixing this. I've wondered for a long time if this change should be reverted (indeed asking so), but again, I don't use typescript so I've no idea. Someone, please take a lead on what's right here and I'll happily merge in if it gets the consensus. |
@remy the correct approach would be to only set the impicit edit: alternatively just remove the whole implicit |
Thought I'd mention that this also breaks
Using |
ts-node
is the standard for running typescript node programs on development mode.Adding this line will enable everyone with a
tsconfig.json
to have a full-refresh server watching experience. (: