title: nodejs module.js:340 error: cannot find module
body: <p>I installed nodejs in C:\Program Files (x86)\nodejs</p>
  
  <p>then I created a .js file and saved it in my desktop just to output 'hello world' in the console:</p>
  
  <pre><code>console.log('hello world');
  </code></pre>
  
  <p>When I tried to run the file from the command prompt:</p>
  
  <pre><code>C:\Users\Laura&gt;cd desktop
  C:\Users\Laura\Desktop&gt;node nodeTest.js
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>module.js:340
  throw err;
        ^
  Error: Cannot find module 'C:\Users\Laura\Desktop\testNode.js'
  at Function.Module._resolveFilename (module.js:338:15)
  at Function.Module._load (module.js:280:25)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:901:3
  </code></pre>
  
  <p>I read many other related questions, and some of them recommend to run the install, and so I did.</p>
  
  <pre><code>C:\Users\Laura&gt;npm install -g express
  </code></pre>
  
  <p>But no luck, still getting the same error message.</p>