nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
106.62k stars 29.07k forks source link

Arrow keys not working in any console. #5940

Closed sant123 closed 8 years ago

sant123 commented 8 years ago

Hi, I've found and error when I was working with Inquirer.js. The problem is that I can't move the checkbox options with the arrow keys. This works in v5.1.0 of Node.js but the problem comes in this version. I've read something regard with this here: https://github.com/nodejs/node/issues/5384 and it seems the problem comes again.

You can check this following this example link: https://github.com/SBoudrias/Inquirer.js/blob/master/examples/checkbox.js

I've test this example in: CMD, GIT BASH and PowerShell.

mscdex commented 8 years ago

Does node master work? The tty patch you referenced should be included there.

sant123 commented 8 years ago

Tty patch? I'm sorry but I do not know what is that... In the other hand, I've tested the example above with v5.1.0 again and effectively work. Could you follow the steps I gave you in order to reproduce the issue? Thanks.

mscdex commented 8 years ago

I meant if you check out the master branch for node, compile it, and try your code again, does it work for you?

sant123 commented 8 years ago

@mscdex I tested it with the master branch for Node and it didn't work :cry: @egoroof Ok ok, even with the nodeschool examples I had had that problem.

egoroof commented 8 years ago

@sant123 that fix already reverted from master branch because of regression :cry:

sant123 commented 8 years ago

O.o? But it was working! As the previous arrows key example until this new version appeared.

sant123 commented 8 years ago

A new release has appeared but the bug persist, now I have v5.10.0. Please look this related issue: https://github.com/SBoudrias/Inquirer.js/issues/303 as @Amberlamps said, it works if you add a simple boolean question.

SalvatoreMeschini commented 8 years ago

The issue seems to persist... Arrow keys do not work, tested with Node version: 5.7.0 on Windows 10 Pro 64 bit command prompt.

Npm version: 3.7.5 Yo: 1.7.0

edgolub commented 8 years ago

Same issue for me.

I've tested with Yo and generator-webapp here:

image

I also had the same issue with the learnyounode npm package I found on nodeschools.

I'm running Windows 10, Node & npm versions can be seen in the screenshot.

jasnell commented 8 years ago

@nodejs/platform-windows @nodejs/ctc ... anyone have any ideas on this one? If there's an issue here it would be great to have it fixed for v6

sant123 commented 8 years ago

That's right, even I've tested with Yeoman and npm-check an sometimes work, for real. What you have to do is open, check if work, if not, then close and open again until it works. It's weird but it works, but in inquirer never worked.

jasnell commented 8 years ago

@orangemocha ... I know you were investigating this. Any updates?

orangemocha commented 8 years ago

I am investigating https://github.com/nodejs/node/issues/5384. However, I cannot reproduce this issue so I am not sure if they are related.

@sant123 , could you please clarify the steps to reproduce the problem? I have tried:

npm install inquirer
node checkpoint.js

... with node v5.10.1. Arrow keys seem to work fine.

sant123 commented 8 years ago

Of course @orangemocha , what you have to do is copy the whole example from https://github.com/SBoudrias/Inquirer.js/blob/master/examples/checkbox.js and then call node checkbox.js. Also you can try with Yeoman(in some cases doesn't work) and npm-check.(the most of the cases doesn't work)

Just to clarify I'm using Windows 8.1 64 bits

sant123 commented 8 years ago

Here is my test of Inquirer.js. main.txt However is something curious, if you uncomment the code:

  {
    type: "confirm",
    name: "mood",
    message: "Are you feeling alright?",
    default: true
  }

The program works! But is not a good solution.

jasnell commented 8 years ago

Closing as a duplicate of https://github.com/nodejs/node/issues/5384. The issue still exists we just don't need multiple issues open for it! The issue is still being investigated!