npm init not working and getting stuck on version

Belos picture Belos · Jun 10, 2017 · Viewed 12.5k times · Source

So I am using version 8.1.0 of Node.Js and when I call npm init to set up a project it goes to version and stays there. I have tried pressing enter or quitting with ^C but nothing happens. I have waited for over an hour and it hasn't progressed at all. Any idea what I should do?

Here is basically what I am seeing: npm init error

Edit: I tried reinstalling and still didn't work; so I uninstalled version 8.1.0 and installed the user recommended one (6.11.0) and it works fine. I am pretty sure it's a bug in version 8.1.0, but it's the one I need.

Edit 2: Oh, I am running this on Windows 10.

Answer

Zinox picture Zinox · Nov 22, 2017

I am having the same problem. However to by-pass and create the package.json file you can use the -y flag and this creates a file with defaults that you can edit later

$npm init -y