Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrows are not working in cmd? #844

Closed
ouahibAbdou opened this issue Aug 29, 2019 · 8 comments
Closed

Arrows are not working in cmd? #844

ouahibAbdou opened this issue Aug 29, 2019 · 8 comments

Comments

@ouahibAbdou
Copy link

No description provided.

@ResourceHog
Copy link

ResourceHog commented Aug 30, 2019

This is happening for me as well. (in my case powershell)

@SBoudrias
Copy link
Owner

@ResourceHog @ouahibAbdou how are you running your app?

node index.js or something else? If it's something else you need to make sure the input events are piped in.

@ResourceHog
Copy link

ResourceHog commented Aug 30, 2019

That's exactly how aframe-typescript-toolkit runs.

equivalent script in question:
https://github.com/olioapps/aframe-typescript-toolkit/blob/master/cli.js

"npm run cli" is what I use but it's just an alias for "node cli.js"

Package file:
https://github.com/olioapps/aframe-typescript-toolkit/blob/master/package.json

@wztscau
Copy link

wztscau commented Jan 7, 2020

Nodemon has this problem. Use node instead of nodemon.

@accimeesterlin
Copy link

I can confirm that this is not an issue with inquirer itself. It's an issue with nodemon. Run the app using node instead

node index.js

@dhl
Copy link

dhl commented Sep 30, 2020

This is definitely a problem I can reproduce with rawlist, even without nodemon involved. list, on the other hand, is fine.

I have two modules:

app.js         # entry module, what gets launched with `node app.js`
menu.js        # creates a menu with `inquirer`. This is where `inquirer` is loaded.

With this setup, arrow key doesn't work on rawlist. However, if I require inquirer in app.js and pass the module into menu.js and using the passed in module, arrow key would work.

@adivated
Copy link

adivated commented Oct 4, 2020

it's actually not a bug in either inquirer or nodemon, pass stdin to nodemon with -I flag. See:
remy/nodemon#1445
https://github.com/remy/nodemon/blob/master/doc/cli/options.txt#L16

@gouroujo
Copy link

gouroujo commented Dec 1, 2020

For anyone looking for the nodemon configuration : { stdin : false } in the configuration file or --no-stdin flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants