title: process.argv is undefined in node.js
body: <p>I can't seem to be running the most trivial of scripts in node:</p>
  
  <p>Platform: windows 10</p>
  
  <p>node -v: v10.7.0</p>
  
  <p>file: "sample.js"</p>
  
  <pre><code>process.argv.forEach((val, index) =&gt; {
      console.log(`${index}: ${val}`);
    });
  </code></pre>
  
  <p>command line:</p>
  
  <pre><code>D:\temp&gt;node sample.js 1 2 3
  D:\temp\sample.js:4
  process.argv.forEach((val, index) =&gt; {
               ^
  
  TypeError: Cannot read property 'forEach' of undefined
      at Object.&lt;anonymous&gt; (D:\temp\sample.js:4:14)
      at Module._compile (internal/modules/cjs/loader.js:689:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
      at Module.load (internal/modules/cjs/loader.js:599:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
      at Function.Module._load (internal/modules/cjs/loader.js:530:3)
      at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
      at startup (internal/bootstrap/node.js:266:19)
      at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
  </code></pre>