Foundation-sites: Arrow keys not working when trying to install new Foundation 6 project, and hangs up on install.

Created on 20 Nov 2015  ·  20Comments  ·  Source: foundation/foundation-sites

How can we reproduce this bug?

  1. Using Windows 10, Ruby v-2.2.3 (windows installer), Node.js v-5.1.0, Git v-2.6.3
  2. Run: npm install --global foundation-cli
  3. Run: foundation new

What did you expect to happen?

  1. When trying to install new foundation project it says to use arrow keys. Expected to have the arrow that is pointing to the selected row to move when pressing arrow keys.
  2. Expecting to go back to command line after installing template.
    What happened instead?
  3. Nothing. Even after figuring a way to manipulate the wording and manually move the arrow pointing to the selected row, it still just picks the first selection.
  4. After trying to install the basic template, because it won't let me pick the zurb template, it hangs up at "Now run foundation watch while inside the foundation folder."
    Test case
cli 🐛bug

Most helpful comment

Maybe cli arrows work fine on a Mac but I haven't gotten them to work on PC. I was using git bash as my cli and nothing in the foundation setup worked other than enter, so all I could setup was a default foundation for sites project.

I found a solution: use the default windows cli ( run > cmd). The arrows still dont allow me to select up and down but now I can select different options by typing in their corresponding numbers ( thanks @gakimball ).

Hope this helps all my PC brothers and sisters out there!

All 20 comments

This might be an issue with inquirer, the module which generates those questions. I'll try to recreate it first.

@curtisblack2004 Did you figure out a solution to this problem yet? I'm experiencing the exact same issue.

I try to use the arrow keys to select "A web app", and the command prompt doesn't let me. If I choose "A website" and it asks me which template to use, the arrow keys mysteriously work for those 2 options.

@jefferjacobs Nope, never figured it out, I just stuck with foundation 5 for now.

@curtisblack2004 Another user reported this issue and figured out the problem:

I found that in Git Bash (mintty) MINGW64 is cant use the arrows. HOWEVER in Git CMD I can. It is a work around, but maybe it will help anyone stuck at the moment until fixes ge rolled out.

So it might be your specific command line.

@curtisblack2004 Also FYI you can use the number keys (1–3) to highlight options, and then hit Return to select one.

Going to close this as the issue is with a specific command line, so it's not something we can control. However, as I mentioned, it is possible to use the number keys to select options in the multi-select menu.

still bugged :(
why not just let the user type?

edit: works on Git CMD

I'm having same issue, arrow keys not working on any cli in windows 10, not the first bug I have encountered with foundation cli, do you even cross platform test? I suggest zurb removes this "feature" and allow users to type 1,2 or 3 to access various different products.

I am having the same issue now. Ever since updating to CLI 2.0.2 - Was able to use number keys though.

@davebatt The menu isn't code we wrote, it comes from a library called inquirer. Some of the arrow key issues are even Node-specific, so there's not much we can do about them.

@gakimball At the moment "foundation new" arrow key selection is broken, I will assume for many windows users. There is no way to create foundation apps or email projects from the cli.

Is there a fix or workaround?

@davebatt You should be able to use the number keys to make a selection.

I'm facing with the same issue and I can not make a selection even with number keys. Is there any other way to select foundation packages through cli?

Maybe cli arrows work fine on a Mac but I haven't gotten them to work on PC. I was using git bash as my cli and nothing in the foundation setup worked other than enter, so all I could setup was a default foundation for sites project.

I found a solution: use the default windows cli ( run > cmd). The arrows still dont allow me to select up and down but now I can select different options by typing in their corresponding numbers ( thanks @gakimball ).

Hope this helps all my PC brothers and sisters out there!

cmd windows does the trick, seems to be a issiue with MINGW64. Good one @davebatt

cc @paxperscientiam this may interest you

@kball It does. Unfortunately, I don't have access to a windows box to test on :/

@paxperscientiam @kball I'm on Windows and I remember having this issue. Using Bash Shell (MINGW64) I wasn't able to navigate, but worked fine with cmd.

Not sure if its a CLI related issue or actually with the Bash Shell - never use the CLI so not an issue for me personally 😄

@brettsmason Ah, if it really bash related, I might be able to figure it out as I'm well versed in bash.

I'm loathe to leave my bash shell :)

Hm, I will have to see if there is a way to use MinGW on macOS.

macports to the rescue

I think we can use an short way for this problem, here is my solution, just run:
foundation new --framework sites --template zurb

You can customize other options as you want.

Reference: https://www.sitepoint.com/getting-started-with-foundation-6s-cli-tools/ (section Using Foundation CLI)

Was this page helpful?
0 / 5 - 0 ratings