title: Node "readline-sync" module : Enter key doesn't consistently function
body: <p>When using Node module "readline-sync", the "prompt" and "question" methods don't consistently execute on enter key, as intended. How can I fix this?</p>
  
  <p>I've included code snippets of both methods being called, along with an image labeled "nodemon" as an example of the exact output the methods produce (Image shows empty lines, which should theoretically have the next question instead.).</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// |- Character First Name
  
    console.log("What is your Character's First Name? : ");
    general.firstName = readline.prompt();
    
  // |- Alignment 
  
    story.short = readline.question("What is your characters alignment?");</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://i.stack.imgur.com/JSNmG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JSNmG.jpg" alt="nodemon"></a></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I've found this issue is caused by the nodemon package, as the issue does not persist if I instead use node to execute the script. This isn't a fix, but a temporary workaround. I've included an image, which contains the execution of the same code used in the "nodemon" image. </p>
  
  <p><a href="https://i.stack.imgur.com/DIMQ5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DIMQ5.png" alt="node"></a></p>