title: Mongoose: Error cannot find module debug
body: <p>I'm building a basic MEAN webapp and am new to the stack. I have the front end running, but as soon as I add the following lines to app.js:</p>
  
  <pre><code>var mongoose = require('mongoose');
  require('./models/test');
  mongoose.connect('mongodb://localhost:3000/design-data-test');
  </code></pre>
  
  <p>I get the following error in terminal:</p>
  
  <pre><code>Error: Cannot find module 'debug'
      at Function.Module._resolveFilename (module.js:336:15)
      at Function.Module._load (module.js:278:25)
      at Module.require (module.js:365:17)
      at require (module.js:384:17)
      at Object.&lt;anonymous&gt; (/Users/username/node_modules/mongoose/node_modules/mquery/lib/mquery.js:11:13)
      at Module._compile (module.js:460:26)
      at Object.Module._extensions..js (module.js:478:10)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)
      at Module.require (module.js:365:17)
      at require (module.js:384:17)
  </code></pre>
  
  <p>And all of my front end code stops running. Mongodb is running on the default port.</p>
  
  <p>How would I go about resolving this error? </p>