Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cmd prompt freezes until I hit CTRL+C, then continues as normal

I'm having a weird issue.

I'm trying to set up a project I downloaded. The project is a web application with server components in Node.js and client components in Angular.

When I do things like npm install in command prompt, it just freezes at _, until I hit CTRL+C, when it resumes and everything executes succesfully.

This is really strange. Any ideas why this is happening?

like image 736
CodyBugstein Avatar asked Dec 01 '14 14:12

CodyBugstein


People also ask

Why does command prompt get stuck?

One reason why you're unable to run the command prompt on your computer is that there might be a third party software causing conflict to it. For us to assist you, we suggest that you start your PC in safe mode.

What does Ctrl C do in CMD?

In graphical user interface environments that use the control key to control the active program, control+C is often used to copy highlighted text to the clipboard. In many command-line interface environments, control+C is used to abort the current task and regain user control.

Why Ctrl C is not working in CMD?

Although Ctrl+C works fine on my PC in normal mode, perhaps you have UAC disabled and need to run CMD in administrator mode in order for Ctrl+C to work. To run in CMD in administrator mode, click on "Search", type in "cmd", right-click on "Command Prompt (Desktop app)", and choose "Run as administrator".

Why does my command prompt pop up and close on startup?

Determine if a background program or a software conflict triggers command prompt to open at startup. Select System Configuration > go to the Services tab. Click Disable all. Go to Startup tab > Open Task Manager > Disable all the unnecessary services running there.


1 Answers

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:

though note that you don't have to actively highlight anything for it to stop; I think that's a red herring (or the install is "highlighting" something)

This "Randomly" hang issue is causing by CMD when you trying to highlight inside of CMD. To resolve this issue:

  1. right click title bar
  2. select Defaults
  3. unselect Quick Edit Mode from the Options tab
  4. reopen CMD

I've given that 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.

like image 113
ruffin Avatar answered Sep 24 '22 02:09

ruffin