title: Cannot run nodejs script in command prompt
body: <p>When I try to run a <code>node.js</code> program in Windows command prompt by stating its location, it will invariably say:</p>
  
  <blockquote>
    <p>[stated location] is not recognized as an internal or external command, operable program or batch file.</p>
  </blockquote>
  
  <p>In all answers to similar questions, in all <code>node.js</code> manuals, it is assumed you can just run a <code>node.js</code> file by calling it from its location. There will always be the suggestion of trying some <code>hello world</code> example BEFORE establishing a server and so on.</p>
  
  <p>Even if I clean the command prompt with <code>prompt $ cmd</code>, and then write the whole location manually, I get the same message.</p>
  
  <p>When I run </p>
  
  <pre><code>echo %path%
  </code></pre>
  
  <p>I get <code>C:\Program Files\nodejs\bin</code></p>
  
  <p>When I run </p>
  
  <pre><code>node -v 
  </code></pre>
  
  <p>I get <code>v6.10.3</code></p>
  
  <p>When I run</p>
  
  <pre><code>node a00.js
  </code></pre>
  
  <p>(where <code>a00.js</code> is the script's name), it believes the whole path is a module, so it says it <code>cannot recognize that module</code>.</p>
  
  <p>If I clear the command prompt with <code>prompt $ cmd</code> and then run <code>node a00.js</code>, it believes <code>a00.js</code> to be a module, so it says it <code>cannot recognize that module</code>.</p>