npm init - how to confirm the "Is this ok?" question #14257
Comments
Same problem!Please help |
I determined it happens only in git bash. In the default windows command line it works as expected. |
Yeah, it works perfectly fine in default windows CMD prompt. Thanks for that retan. |
Do all of the other questions in |
@legodude17 it seems all the others do work. If I press |
Do you have a file called |
@legodude17 Where exactly? It's not in my project in any case. |
In you home directory, called |
No, there's none. |
Ok. I looked through the code, the real problem is the |
Upon looking at |
Issued a PR to fix that in |
@legodude17 I've run that command in git bash and the output was: |
Now I am very confused. What do you think @kenany or @zkat? It looks like the command was parsed wrong. Try opening the
|
@legodude17 sorry but I'm relatively new to node. What is REPL? |
Just run |
OK. 😆
|
Oh right. I forgot. Third try is the charm. Go to empty directory, run
|
Here's the output after hitting
But now if I try to type some answer something strange is going on. Here I tried to type
Here I tried to type
|
So the command worked, but the way the REPL works, it was interpreted once by the read(1), and then again by the REPL itself. This is actually kind of a bug with the REPL. Do you still have this issue after updating to the latest |
I've just installed the lasted node.js.
Thee result of your code in git bash is exactly the same. |
Does |
No, it does not. |
I've just tried to run
|
According to the log, it exited. Does it still hang? |
Yes it does. |
That is very strange, because it says it exited. @kenany, any thoughts? |
Same problem just now. New to Node & Gitbash. Would love if it worked. |
@vemvemvem My advice until it get fixed - just use the regular windows command line for |
I still don't get how it was saying it exited and then not exiting. On Tue, Nov 22, 2016 at 10:48 AM, Oliwer notifications@github.com wrote:
|
@legodude17 Maybe you should install git bash and test it yourself. Maybe there's something running in the background that doesn't respond the way that git bash expects (it's just a wild guess). |
I don't have a windows machine. `npm init` works fine for me. Try running
`npm init -y` in git bash. Does it still hang?
…On Wed, Nov 23, 2016 at 3:37 PM, Oliwer ***@***.***> wrote:
@legodude17 <https://github.com/legodude17> Maybe you should install git
bash and test it yourself. Maybe there's something running in the
background that doesn't respond the way that git bash expects (it's just a
wild guess).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#14257 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKr56KTJQ3uIOsXeEQd16CHvvi0zIbTNks5rBM4tgaJpZM4KUpXH>
.
|
|
Hi retan I had this problem and in fact you just press ctrl + C and it takes you back to the command line in git bash in the directory you would have set up for this |
@retan @legodude17 @Philneeves Both methods work. "npm init -y" as well as "npm init" & CTR + C while screen hangs. Thanks guys ! |
Of course you can kill it. That does not change the fact something is not working here as expected, which is confusing. |
I agree with @vemvemvem and @retan. You can kill it, but it should exit on its own. I will look into this more soon. |
You should run this command and restart git-bash. $ echo alias npm=\"winpty npm.cmd\" >> ~/.bashrc |
@hyeonsig What does that command do? |
It runs |
@hyeonsig Is this what you meant? https://github.com/rprichard/winpty |
Hi guys sorry for my comment before about ctrl + c as of course that does just break you out of it if it is hanging. I'd only just started using it and wasn't aware. The issue is in fact with git bash and I've switched now to Windows Powershell for my git and that works perfectly. |
Hmm still no fix for this? |
It's a git bash issue, just don't use git bash |
Experiencing the same issue in Git Bash. Despite the package.json being created, the process still runs. Just do a CTRL + C to terminate the process. |
Still having the issue here. Thanks to this thread for work-arounds. |
Have same issue with npm v4.5.0 on node v.7.10.0 compiled on Windows 10 with VS2017 Community Edition (seems to use VS2015 toolkit) under MSYS2, MINGW64, and Cygwin bash shells. Problematic for writing shell scripts that include an |
I can confirm this error on git-bash too. However, I also use embedded git bash in IntelliJ idea for my projects, and it doesn't hang there which is strange, since its still only calling the same executable. No issues on Powershell, Windows Bash (beta) or Command Line. |
I have the same experience as @stevematdavies, except I'm using embedded git bash in Visual Studio Code (Insiders, which is the unstable/edge branch of VSC). The standalone git bash hangs, the embedded version doesn't, but they're both running bash.exe from the same file. Running
|
I think it might be something to do with the terminal, not the command line. Git bash might doing something odd. |
i think you can just type c + ctrl then back to normal |
We're closing this support issue as it has gone three days without activity. The npm CLI team itself does not provide support via this issue tracker, but we are happy when users help each other here. In our experience once a support issue goes dormant it's unlikely to get further activity. If you're still having problems, you may be better served by joining package.community and asking your question there. For more information about our new issue aging policies and why we've instituted them please see our blog post. |
npm init -y totally worked. |
I'm opening this issue because:
It's not a big issue but it a bit irritating. When I run the npm init everything goes fine. The package.json is created but I have no idea how to confirm the "Is this ok? (yes)" question. I expect that after confirmation the process should stop / terminate itself. I tried hitting
Enter
, typing "yes" and hittingEnter
, typing "y" and hittingEnter
but I only get some new lines.Running on , using git bash.
supporting information:
npm -v
prints: 3.7.3node -v
prints: v5.9.1npm config get registry
prints: https://registry.npmjs.org/The text was updated successfully, but these errors were encountered: