title: Node.JS cannot find module 'xml2js' (Windows)
body: <p>OS: Windows 7 64-bit</p>
  
  <p>Need to do parsing xml-file using Node.js. </p>
  
  <p>Using a library for parsing <a href="https://github.com/Leonidas-from-XIV/node-xml2js" rel="noreferrer">xml2js</a>.</p>
  
  <p>Xml2js installed using the command "npm install xml2js".</p>
  
  <p><br/>
  However, if you run the code:</p>
  
  <pre><code>var fs = require ('fs'), xml2js = require ('xml2js'); 
  
  var parser = new xml2js.Parser (); 
  fs.readFile ('&lt;path to the xml-file&gt;', function (err, data) {
       parser.parseString (data, function (err, result) {
           console.dir (result); 
           console.log ('Done'); 
       }); 
  });
  </code></pre>
  
  <p>an error:</p>
  
  <pre><code>module.js:340
      throw err;
            ^
  Error: Cannot find module 'xml2js'
      at Function.Module._resolveFilename (module.js:338:15)
      at Function.Module._load (module.js:280:25)
      at Module.require (module.js:364:17)
      at require (module.js:380:17)
      at Object.&lt;anonymous&gt; (&lt;путь до js-файла&gt;:3:14)
      at Module._compile (module.js:456:26)
      at Object.Module._extensions..js (module.js:474:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:312:12)
      at Function.Module.runMain (module.js:497:10)
  </code></pre>
  
  <p>Tell me, please, how to solve the problem?</p>