prompts icon indicating copy to clipboard operation
prompts copied to clipboard

Problem with select and invisible and other types

Open GuyoST opened this issue 3 years ago • 3 comments

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:

image Arrows key are shown instead of selecting.

image password is shown

Additional context

Nothing special

GuyoST avatar May 06 '21 08:05 GuyoST

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.

nosTa1337 avatar Jul 26 '21 10:07 nosTa1337

Same problem with nodemon

Bluzzi avatar Apr 22 '22 20:04 Bluzzi

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

keeganbrown avatar Apr 13 '23 21:04 keeganbrown