'npm install, can't type Y/n in cmd

I am trying to setup a react-js website, and when I do npm install, it asks me:

Building the Webpack DLL...
[webpack-cli] For using 'build' command you need to install: 'webpack' package.
[webpack-cli] Would you like to install 'webpack' package? (That will run 'npm install -D webpack') (Y/n) 

The problem is, it is impossible to type anything. I tried cmd, powershell, git bash. It does not allow me to type. Why is this happening?

When I run the actual command npm install -D webpack it executes. But when I run npm install to continue installing, the same thing happens again, again asking me to type Y/n as if webpack wasn't installed already.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source