Closed rtpg closed 5 months ago
sample execution
rtpg@HOSTNAME ‹ main ●● › : ~/proj/break
[1] % npm run dev1
> dev1
> ./call_nodemon.js dev_busted
^C
rtpg@HOSTNAME ‹ main ●● › : ~/proj/break
[130] % npm ERR! path /home/rtpg/proj/break
npm ERR! command failed
npm ERR! signal SIGPIPE
npm ERR! command /usr/bin/bash -c (nodemon --exec 'echo hi') || echo 'no'
npm ERR! A complete log of this run can be found in: /home/rtpg/.npm/_logs/2023-12-21T05_31_20_117Z-debug-0.log
^[OA^[OB^[OA^[OB^[OA
session example, notice how the npm error shows up after my prompt appears, and then a bunch of "raw" up and down arrow keypressees (SIGINT'ing again with Ctrl-C does fix my shell though)
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. Thank you for contributing <3
I believe this to still be an issue, though I personally have a workaround of passing in /dev/null as stdin to nodemon as a workaround
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. Thank you for contributing <3
Automatically closing this issue due to lack of activity
I have the following environment:
If I call
npm run dev1
, then SIGINT with Ctrl-C, my shell ends up stuck in (I believe) raw mode (maybe echo-only mode, having trouble telling). I believe this is happening during teardown of some child processes due to my shell sometimes working for a second before breaking (i.e. the prompt prints, and I have a half second window where the up or down arrow properly lets me search history, then I get the telltale ^[0A^[0B `stuff)If I run
npm run dev2
this does not happen (the difference being the extra echo call or no)If I run
npm run dev_busted
directly, the issue does not happen.If, I comment out
process.once('SIGINT' , () => bus.emit('quit', 130)
inlib/monitor/run.js
, the issue no longer happens (though there are obviously probably consequences to that onnodemon
overall)If I replace that line with
process.once('SIGINT', () => {})
, the issue does happen. I have reported an issue upstream to nodejs that seems to indicate something weird going on in that front.(some context: the original place where I had the issue was an
npm-run-all
script calling intonodemon
. I stripped everything down to thecp.spawn
call I have incall_nodemon.js
, but that's how I ended up with this setup)Versions
nodejs
repro on Mac, haven't repro'd this yet due to not having access to one)Expected behaviour
After I terminate
nodemon
with SIGINT, my shell should recover