I've had a number of freezes after an npm i
that, even if I scorch the node_modules folder & npm cache (rmdir /S /Q node_modules
and then npm cache clean --force
), can still happen and that don't seem to happen at predictable times.
Here's one possible answer from the nodejs project's github issues pages, edited slightly to match what I see now in Win10:
This "Randomly" hang issue is causing by CMD when you trying to
highlight inside of CMD. To resolve this issue:
- right click title bar
- select Defaults
- unselect Quick Edit Mode from the Options tab
- reopen CMD
Though note that you don't have to actively highlight anything for npm to stop; I'm going to guess something npm executes is "highlighting" some text as part of its log to the console and that interaction throws off cmd (as Brocco implied in 2014 and ArbitraryChoices seemed to confirm yesterday).
I've given turning off Quick Edit Mode a try with some success. I think the downside is limited to you having have to hit Alt-space, e, k
to select text with the mouse like you did before Quick Edit Mode was foisted on us.