Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm init not working and getting stuck on version

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.

like image 440
Belos Avatar asked Jun 10 '17 19:06

Belos


1 Answers

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
like image 167
Zinox Avatar answered Oct 16 '22 01:10

Zinox