title: Npm install with success but nodejs cannot find module 'db'
body: <p>This error is so common but although I searched a lot of similar questions I did not found a solution to my problem. I installed the module with no problems using "npm install db".</p>
  
  <p>The "server.js" is in the same folder as"node_moludes" and NPM created a "db" folder inside "node_moludes" with all the content.</p>
  
  <p>All NPM commands return success (install, link, list etc), I even added the module to my "package.json" and it also installs with no problem just using "npm install -d".</p>
  
  <p>Despite it all, when I run the server, Nodejs can't find the 'db' module... any help? </p>
  
  <p>nodejs version: 0.10.26</p>
  
  <p>npm version: 1.4.3</p>
  
  <p>server.js</p>
  
  <pre><code>var http = require('http'),
      url = require('url'),
      db = require('db');
  
  var send = function(response, data){
    response.writeHead(200, {
      'Content-Type': 'text/plain',
      'Access-Control-Allow-Origin': '*'
    });
    response.end(JSON.stringify({data: data}));
  };
  
  http.createServer(function (request, response) {
    var query = url.parse(request.url, true).query;
    if(query.set) {
      db.set(query.set, query.val || '');
      send(response, true);
    } else if (query.get) {
      db.get(query.get, function(data){
        send(response, data);
      });
    } else send(response, query);
  }).listen(80);
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>{
    "name": "xxxxx",
    "version": "0.0.1",
    "author": "rafaelcastrocouto",
    "repository": "git://github.com/rafaelcastrocouto/xxxxx",
    "dependencies": {
      "db": "&gt;= 1.00.x"
    },
    "engine": "node &gt;= 0.10.x"
  }
  </code></pre>