prompts
prompts copied to clipboard
Problem with select and invisible and other types
Describe the bug
Unable to select choices in select type, and invisible type is visible.
To Reproduce
Steps to reproduce the behavior:
For choices :
const { answer } = await prompts({
type: 'select',
name: 'answer',
message: "Voulez-vous ajouter un nouveau profil ?",
choices: [
{ title: "Oui", value: true },
{ title: "Non", value: false }
]
})
For invisible :
await prompts({ type: 'invisible', name: 'answer', message: "Saisissez un nom de profil (exemple : Compte de Laeticia) : " });
Expected behavior
Arrow to select a choice. Password not shown
System
- Windows 10 up to date (also tested in Ubuntu WSL)
- Tested on Powershell, terminal of vscode and Ubuntu shell in WSL
- tested with node 12.18.3 and 14.16.1
Screenshots:
Arrows key are shown instead of selecting.
password is shown
Additional context
Nothing special
Same here. Fresh installed and tried to test. Cannot select anything.
// edit
I have tried it with nodemon. After running it with npm run start server.ts it is working.
Same problem with nodemon
This appears to be an issue related to nodemon
and not prompts.js
-- see this issue: https://github.com/remy/nodemon/issues/1525. TLDR -- follow the instructions here: https://github.com/remy/nodemon/blob/master/faq.md#nodemon-doesnt-work-with-my-repl