SBoudrias/Inquirer.js

Select hanging on choose option

andyjessop opened this issue · 2 comments

Here's my code:

home();

async function home() {
  const answer: Action = await select({
    choices: [
      {
        description: 'Create a note and embed it',
        name: 'Create Note',
        value: 'ADD_NOTE',
      },
      {
        description: 'Fetch similar items',
        name: 'Fetch Similar Items',
        value: 'FETCH_SIMILAR_ITEMS',
      },
      {
        description: 'Query Notes',
        name: 'Query Notes',
        value: 'QUERY',
      },
    ],
    message: 'Select an action',
  });

  const answer2 = await input({ message: 'Enter path to note' });

  console.log(answer, answer2);
}

After selecting "Create Note", I get the following:

Screenshot 2023-12-07 at 17 41 35

I would expect it to go to the next prompt, but it hangs. Note that if I type something in (it's hidden), and hit enter, I then see both outputs:

Screenshot 2023-12-07 at 17 42 52

Hi, did you test it on Node?

This looks like a bun bug. You should report this issue over there.

Good call, that's what I feared. I'll ask over there.

Thanks for the quick reply!