I’ve encounter a very strange problem after installing nmp prompts. I’m trying to run nmp prompts example code, but can’t enter any input at all. When I run the code the underscore in the input field blinks for a few second, then the cursor jumps to the next line of the terminal and I can’t click into the input field to write anything.
Tried running it in cmd and in VSC terminal. Here is the code itself:
const prompts = require('prompts');
(async () => {
const response = await prompts({
type: 'number',
name: 'value',
message: 'How old are you?',
validate: (value: number) => value < 18 ? `Nightclub is 18+ only` : true
});
console.log(response); // => { value: 24 }
})();
Only thing I changed was adding type ‘number’ to ‘value’