title: ".then is not a function" from a very simple inquirer program
body: <p>the very simple example below (pretty much copied off the npm inquirer front page) is giving the ".then is not a function" error. However I can't figure out what the issue is. </p>
  
  <pre><code>var inquirer = require('inquirer');
  
  inquirer.prompt([
          {
              name: 'my_name',
              type: 'input',
              message: 'What is your name: '
          }]).then(answers =&gt; {
                      console.log("Your name is:"+answers.my_name)            
                      });
  </code></pre>
  
  <p>The error message looks like this:</p>
  
  <pre><code>? What is your name:
  
  /home/peter/Documents/nodejs.d/vscode_examples_workspace/security/inq.js:8
          }]).then(answers =&gt; {
              ^
  
  TypeError: inquirer.prompt(...).then is not a function
      at Object.&lt;anonymous&gt; (/home/peter/Documents/nodejs.d/vscode_examples_workspace/security/inq.js:8:13)
      at Module._compile (internal/modules/cjs/loader.js:654:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
      at Module.load (internal/modules/cjs/loader.js:566:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
      at Function.Module._load (internal/modules/cjs/loader.js:498:3)
      at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
      at startup (internal/bootstrap/node.js:201:19)
      at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
  </code></pre>
  
  <p>But the following example works OK. So the basic node.js environment (nodejs --version = v9.11.2) is OK. </p>
  
  <pre><code>var inquirer = require('inquirer');
  
  let q = [
      {
          name: 'my_name',
          type: 'input',
          message: 'What is your name: '
      }];
  
  inquirer.prompt (q, function (answers){
      console.log("Your name is: "+answers.my_name);
  });
  
  // Output
  $ nodejs inq.js
  ? What is your name:  Peter
  Your name is: Peter
  </code></pre>