killing npm script doesn't clean up all processes #3181
Unanswered
connorbrannigan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I will preface this by saying I am not sure if this is a lerna or npm issue.
For reference:
We have a repo and a few npm scripts to run the lerna test suites (tests are done using mocha):
When we run either, we get two npm processes spawned:
npm run ...
- essentially, thenpm
command we ran, eithertest
orscoped
(and the package)npm
- just a process callednpm
Periodically, if we kill the test run in the terminal with
ctrl+c
, thenpm test ...
process dies, but thenpm
process will remain, and, its cpu usage will climb to 80%+. In fact, we can do this over and over and have multiplenpm
processes spawn and hang around.The only way to get rid of them, is to run
kill -3 pid
The issue, however, does not occur when we run the
lerna run test
command directly - it only spawns onenpm run test
process.We were on lerna 4.0.0, but we upgraded to the latest version a few days ago in the hopes that the fix referenced in this thread #2284 would work for us - obviously it hasn't.
Anyone had this issue previously? Any thoughts on how best to track down why this extra
npm
process is spawning and why it won't die?NOTE: If I should move this question to another section, feel free to let me know and I'll move it
Beta Was this translation helpful? Give feedback.
All reactions