-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
Does not work after upgrading to 4.0.0 #480
Comments
Hi, i have the same problem when using ts-node >= 4.x.x. When i save a file, node process isn't killed and both dev port and inspector port remains used. If i downgrade to 3.x.x, it starts working again. I use this npm scripts to start in dev mode: |
Possible duplicate #481 |
Can you share the OS or other information so someone can help debug? |
macOS: 10.13.2 I haven't spare time to debug at the moment , otherwise i could do it and post even more info. |
Interesting, thanks. I thought it may have been a duplicate of #481, but not if it's on mac. Looks like these issues may be negative side effects of #419. For anyone running into this, can you switch to using |
node v8.9.0 Win8.1x64 |
@blakeembrey just switched on my windows machine and everything seems to work fine when I rebuild from master on the repo. I do run into this issue when installing from NPM however. |
@stelcheck That's really odd, there shouldn't be a difference between what's on master. Can you diff your built files at all? Maybe something in my release pipeline broke, that would be odd. |
Never mind, I was able to reproduce the issue locally. There seems to be two issues: one related to how early errors are piped through on Windows (maybe mac?), the other I am still investigating. Trying to get a PR in ASAP. |
@blakeembrey Also not work after upgrade 4.0.1 OS: Win10 |
The cause of the issue appears to be that That explains both why nothing gets printed out (the error happens in the subprocess, and its stdout/err is not piped to the main process), but also explains the actual crash (stdin is not a TTY, and no file names are being passed, so the code tries to read... nothing) Since the reason that happens on Windows is because of a fix that was made essentially for *nix system, I'd say the simplest solution would be to not run in detached mode on Windows. I'll make a PR for that right now. |
Addendum: I suspect there might be something going on when using |
Just double-checked on Linux: echo "process.on('SIGINT', () => console.log('called')); setInterval(() => console.log('sadasd'), 1000)" | node dist/bin.js This seems to work properly. @fox1t is it possible that you also catch 'SIGTERM' in your app? You might also want to look into configuring a specific signal for nodemon remy/nodemon#725 89 (been a while I haven't used it, assuming this is still configurable). |
@fox1t Also, I see this issue in nodemon's issue tracker: remy/nodemon#1164 - the reporter is on Windows, but perhaps it is related to your issue as well? |
Here is another PR which would also solve the issue by simply removing subprocesses overall: #499 |
Same problem here after upgrade from 3.3.0 to 4.0.2 However it works fine on CI (unix) build server. |
ts-node
just suddenly stop working after upgrading to 4.0.0 (The same with 4.0.1):nodemon.json
tsconfig.json
nodemon: 1.12.5 (dev dependency)
typescirpt: 2.6.2 (dev dependency)
ts-node: 4.0.1 (dev dependency)
Reverted ts-node back to 3.30 solved the problem.
The text was updated successfully, but these errors were encountered: