title: Error: Cannot find module '../build/Release/bson' on Mac
body: <p>I am using node.js to run one app given by my professor on my chrome. Something wrong happen, but I don't know because I am a rookie. 
  The structure is as follows:</p>
  
  <pre><code>/app
     /models
        answers.js
        questions.js
        sessions.js
        user.js
     passport.js
     qmanage.js
     routes.js
  /config
     auth.js
     database.js
     mcd.js
  package.json
  /public
     some css png fonts jpg document
  qloader.js
  server.js
  /views
     some ejs document
  </code></pre>
  
  <p>At first, it shows this problem:</p>
  
  <pre><code>module.js:457
      throw err;
      ^
  
  Error: Cannot find module 'mongoose'
      at Function.Module._resolveFilename (module.js:455:15)
      at Function.Module._load (module.js:403:25)
      at Module.require (module.js:483:17)
      at require (internal/module.js:20:19)
      at Object.&lt;anonymous&gt; (/Users/shen/Desktop/os/cse303.p2/server.js:2:16)
      at Module._compile (module.js:556:32)
      at Object.Module._extensions..js (module.js:565:10)
      at Module.load (module.js:473:32)
      at tryModuleLoad (module.js:432:12)
      at Function.Module._load (module.js:424:3)
  </code></pre>
  
  <p>then, based on this help <a href="https://stackoverflow.com/questions/8623205/node-js-error-error-cannot-find-module-mongoose">Node.js error Error: Cannot find module &#39;mongoose&#39;</a> I run <code>npm install mongoose</code> in my root path of project. Then I have those error below:</p>
  
  <pre><code>dyn143030:cse shen$ node server.js 
  { Error: Cannot find module '../build/Release/bson'
      at Function.Module._resolveFilename (module.js:455:15)
      at Function.Module._load (module.js:403:25)
      at Module.require (module.js:483:17)
      at require (internal/module.js:20:19)
      at Object.&lt;anonymous&gt; (/Users/shen/Desktop/os/cse303.p2/node_modules/bson/ext/index.js:15:10)
      at Module._compile (module.js:556:32)
      at Object.Module._extensions..js (module.js:565:10)
      at Module.load (module.js:473:32)
      at tryModuleLoad (module.js:432:12)
      at Function.Module._load (module.js:424:3) code: 'MODULE_NOT_FOUND' }
  js-bson: Failed to load c++ bson extension, using pure JS version
  events.js:160
        throw er; // Unhandled 'error' event
        ^
  
  Error: Invalid mongodb uri. Missing hostname
      at muri (/Users/shen/Desktop/os/cse303.p2/node_modules/muri/lib/index.js:40:11)
      at NativeConnection.Connection.open (/Users/shen/Desktop/os/cse303.p2/node_modules/mongoose/lib/connection.js:195:16)
      at Mongoose.connect (/Users/shen/Desktop/os/cse303.p2/node_modules/mongoose/lib/index.js:212:15)
      at Object.&lt;anonymous&gt; (/Users/shen/Desktop/os/cse303.p2/server.js:4:10)
      at Module._compile (module.js:556:32)
      at Object.Module._extensions..js (module.js:565:10)
      at Module.load (module.js:473:32)
      at tryModuleLoad (module.js:432:12)
      at Function.Module._load (module.js:424:3)
      at Module.runMain (module.js:590:10)
      at run (bootstrap_node.js:394:7)
      at startup (bootstrap_node.js:149:9)
      at bootstrap_node.js:509:3
  </code></pre>
  
  <p>I tried to find solution from this help
  <a href="https://stackoverflow.com/questions/28651028/cannot-find-module-build-release-bson-code-module-not-found-js-bson">Cannot find module &#39;../build/Release/bson&#39;] code: &#39;MODULE_NOT_FOUND&#39; } js-bson: Failed to load c++ bson extension, using pure JS version</a>
  but it seems not my case, because I am using OS X 10.11.3 </p>
  
  <pre><code>dyn143030:cse shen$ node -v
  v6.5.0
  dyn143030:cse shen$ npm -v
  3.10.3
  </code></pre>
  
  <p>From my aspect, I think the system find bson someplace wrong, so how to modify it? Thanks! If any more information is need, please tell me.</p>