title: Error Connecting to CouchBase from Node.js using Couchnode module v.1.2.4
body: <p>Using <a href="https://github.com/couchbase/couchnode" rel="nofollow">https://github.com/couchbase/couchnode</a> @v.1.2.4 <br/></p>
  
  <p>Attempting to connect to CouchBase server using the code in the README</p>
  
  <pre><code>var couchbase = require('couchbase');
  var cluster = new couchbase.Cluster();
  var db = cluster.openBucket('default');
  
  db.set('testdoc', {name:'Frank'}, function(err, result) {
    if (err) throw err;
  
    db.get('testdoc', function(err, result) {
      if (err) throw err;
  
      console.log(result.value);
      // {name: Frank}
    });
  });
  </code></pre>
  
  <p>but am getting the following error:</p>
  
  <pre><code>db.js:2
  var cluster = new couchbase.Cluster();
                ^
  TypeError: undefined is not a function
      at Object.&lt;anonymous&gt; (/Users/n/code/time/test/db.js:2:15)
      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)
      at startup (node.js:119:16)
      at node.js:906:3
  npr:time n$ 
  </code></pre>
  
  <p>Additional details:</p>
  
  <ul>
  <li>Running Couchbase Version 2.5.1 on Mac (server appears to be working fine)</li>
  <li>Node Version 0.10.29 (latest)</li>
  </ul>
  
  <p><strong>Note</strong>: We tried searching on the CouchBase Bug Tracker: <a href="http://www.couchbase.com/issues/issues/?jql=text%20~%20%22typeError%22" rel="nofollow">http://www.couchbase.com/issues/issues/?jql=text%20~%20%22typeError%22</a> in case other people were having the same error. No luck.</p>