npm init hangs at "Is this OK (yes)"
Node.js Version - v6.11.5 npm Versio -v3.10.10 OS Windows 10 Pro Version 1703
I just installed Node and npm, and I'm trying to run npm init. I get up to:
About to write to C:\Users\dylan\package.json:
{ "name": "dylan", "version": "1.0.0", "description": "This is a test", "main": "index.js", "directories": { "test": "test" }, "scripts": { "test": "Sup Boys" }, "repository": { "type": "git", "url": "Nowhere" }, "keywords": [ "Gazinga" ], "author": "Dylan", "license": "ISC" }
Is this ok? (yes)
However, when I hit return or type "yes" it doesn't exit, and just hangs. Not sure what's going on here. If I hit Ctrl-C it exits and there is a package.json file created.
Hi @dzwick! One thing you can definitely try is the latest version of Node (8.8.1) from https://nodejs.org/en/ instead of 6.11.5. It would probably be good to know if that problem also occurs with Node 8?
(Also, you should also be able to upgrade npm through running npm install -g npm – that may or may not help too!)
If you are in windows, you probably won't be able to update npm running npm install -g npm. Check out npm-windows-upgrade.
Just for curiosity, why you want to create a project in your user/profile folder?
OK! I updated the version and it's working fine now. Thank you!
same issue for me. didn't find any solution.
@dzwick is this a versioning issue ?
not working even after updating npm
@vieckys Can you give more information? What OS are you using? Run node -v, run npm -v. Another thing you may find helpful so we can help you.
hey @michaeljota . i got it fix. It was the versioning issue. i had to restart my system. Thanks BTW
issue resolved, closing then.
sorry, didnt realize that it was already closed, and re-opened instead. Closing now.