Questions tagged [inquirerjs]

Use this tag for questions related to the Inquirer JavaScript package, which provides a command line interface for Node.js.

The Documentation section of the package's GitHub README provides examples of usage, as well as links to various plugins.

67 questions
0
votes
1 answer

Program breaks in second loop without showing any error

I have a simple program to record microphone sound in Windows, made with Node.js. I have some troubles when I execute it. At the time of recording it works perfectly and creates a .wav file as it has to do. But I make this inside a loop and taking…
froggy_
  • 43
  • 1
  • 10
0
votes
2 answers

How can I get a value out of inquirer.js?

I am building a small CLI app using javascript, yargs, inquirer, and superagent. In inquirer I am asking the user to enter a choice of miles to be used in my app. I want to use that value somewhere else in my app but I can't seem to able to get the…
Squanchy
  • 103
  • 1
  • 2
  • 13
0
votes
1 answer

Passing an answer to choices in InquirerJS?

How would I be able to get an answer from a previous question and pass on to the next question for choices for inquirerJS? I know the fact that it is asynchronous but i'm not sure how to create promises here. Any further insight and help would be…
ronsic
  • 205
  • 4
  • 15
0
votes
0 answers

Node.js Vorpal CLI - include subcommands as one command

Say we have this: vorpal.command('find [sumanOptions] [folder]') .description('find test files to run') .action(function (args: Array, cb: Function) { // args => {sumanOptions: 'a b c'} }); how can I pass a string of commands…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
-1
votes
1 answer

.then is not a function?? inquirer node js

I have a basic function im trying to run with node js and inquirer, and when i run it console log gives me this error. TypeError: inquirer.createPromptModule(...).then is not a function. I have seen a similar answer asked and the problem was there…
Zac0088
  • 1
  • 5
-1
votes
1 answer

How do I format data from an Inquirer output into markdown file

I'm making a README generator for a school project, and my inquirer prompts are all functioning fine, but when I call the data from this prompt: { type: "checkbox", name: "languages", message: "What languages/technologies were used to create…
-1
votes
1 answer

How can I make a update prepared statement work in JavaScript in Node JS

.then(function (val) { var roleId = roleArr.indexOf(val.role) + 1; db.query( 'UPDATE employee SET role_id = ? WHERE first_name = ? AND last_name = ?;', [roleId, val.firstname, val.lastName], function (err) { …
1 2 3 4
5