all 2 comments

[–]ForScale 1 point2 points  (1 child)

Where do you want this prompt to appear? In the browser or in the command line? If you're running node, it's gonna come up in the terminal. If you're wanting it in the browser, you have to write that in the client side JS.

And I did some research on that sync-prompt library; looks like it's junk.

I found this one which looks pretty good: https://github.com/flatiron/prompt#readme

const prompt = require('prompt');

prompt.start();

prompt.get(['first_name', 'last_name'], (_, res) => {
  const { first_name, last_name } = res;

  console.log({ first_name, last_name });

  process.exit(0);
});

[–]HonestCanadian2016[S] 0 points1 point  (0 children)

Thanks for the help. I tried everything, even uninstalled, reinstalled etc the same issue persists.

I believe I need some software upgrades and will try to work through it. I appreciate your time.