title: Node js Error. ANY experts?
body: <p>I am a newbie to nodejs . I encountered this error and now i cannot start my npm. Please let me know how to restart the npm and how to prevent from encountering this problem</p>
  
  <p>Error is as follows :</p>
  
  <pre><code>{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
  
  js-bson: Failed to load c++ bson extension, using pure JS version
  C:\Users\sriramr\nodetest1\routes\index.js:129
  collection.find({},{}function(e,docs){
                       ^^^^^^^^
  SyntaxError: Unexpected token function
  at exports.runInThisContext (vm.js:73:16)
  at Module._compile (module.js:443:25)
  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)
  at Object.&lt;anonymous&gt; (C:\Users\sriramr\nodetest1\app.js:11:14)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  
  npm ERR! Windows_NT 6.1.7601
  npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program     Files\\nodejs
  \\node_modules\\npm\\bin\\npm-cli.js" "start"
  npm ERR! node v0.12.0
  npm ERR! npm  v2.5.1
  npm ERR! code ELIFECYCLE
  npm ERR! nodetest1@0.0.0 start: `node ./bin/www`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the nodetest1@0.0.0 start script 'node ./bin/www'.
  npm ERR! This is most likely a problem with the nodetest1 package,
  npm ERR! not with npm itself.
  npm ERR! Tell the author that this fails on your system:
  npm ERR!     node ./bin/www
  npm ERR! You can get their info via:
  npm ERR!     npm owner ls nodetest1
  npm ERR! There is likely additional logging output above.
  
  npm ERR! Please include the following file with any support request:
  npm ERR!     C:\Users\sriramr\nodetest1\data\npm-debug.log
  </code></pre>
  
  <p>SOURCE CODE::INDEX.JS</p>
  
  <pre><code>var express = require('express');
  var router = express.Router();
  
  router.get('/', function(req, res, next) {
  </code></pre>
  
  <p>res.render('index', { title: 'Welcome to conference room Demo.' });
      });</p>
  
  <pre><code>router.get('/userlist', function(req, res) {
  var db = req.db;
  var collection = db.get('usercollection');
  collection.find({},{},function(e,docs){
      res.render('userlist', {
          "userlist" : docs
      });
  });
  });
  
  
  router.get('/newuser',function(req,res){
  res.render('newuser',{title:'Add new user'});
  });
  router.get('/newuser',function(req,res){
  res.render('newroom',{title:'Add new room'});
  });
  
  
  router.post('/adduser', function(req, res) {
  
  
  var db = req.db;
  
  
  var userName = req.body.username;
  var userEmail = req.body.useremail;
  
  
  var collection = db.get('usercollection');
  
  
  collection.insert({
      "username" : userName,
      "email" : userEmail
  }, function (err, doc) {
      if (err) {
  
          res.send("There was a problem adding the information to the     database.");
      }
      else {
  
     res.redirect("userlist");
      }
  });
  });
  /*---------adding room number and room list -------*/
  router.post('/addroom', function(req, res) {
  
  var db = req.db;
  var roomname = req.body.roomname;
  var collection = db.get('roomlist');
  collection.insert({
      "roomname" : roomname
  
  }, function (err, doc) {
      if (err) {
          res.send("There was a problem adding the information to the database.");
      }
      else {
          res.redirect("roomlist");
      }
  });
  });
  /*----------room end list ------------------*/
  /*--------addingtime list ----------*/
  router.post('/addtime', function(req, res) {
  var db = req.db;
  var starttime = req.body.strt_time;
  var endtime = req.body.end_time;
  var emailid = req.body.empemail;
  var collection = db.get('timelist');
  collection.insert({
      "starttime" : starttime,
      "endtime" : endtime,
      "emailid": emailid
  
  }, function (err, doc) {
      if (err) {
          res.send("There was a problem adding the information to the     database.");
      }
      else {
          res.redirect("addtime");
      }
  });
  
    var collection = db.get('roomlist');
  collection.find({},{},function(e,docs){
      res.render('roomlist', {
          "roomname" : roomname
      });
  });
  
  });
  /*---------removing time list --------*/
  /*----removing room number and roomlist -----------*/
  router.post('/removeroom', function(req, res) {
  
      var db = req.db;
      var roomname = req.body.remove_room;
      var collection = db.get('roomlist');
      collection.remove({
          "roomname" : roomname
  
      }, function (err, doc) {
          if (err) {
              res.send("There was a problem adding the information to the     database.");
          }
          else {
              res.redirect("roomlist");
          }
      });
  });
  
  
  
  
  router.get('/roomlist', function(req, res) {
  var db = req.db;
  var collection = db.get('roomlist');
  collection.find({},{}function(e,docs){
      res.render('roomname', {
          "roomname" : docs
      });
      });
  });
  
  /*----------end room number and room list ---------*/
  /*--end db connection for user ---*/
  module.exports = router;
  </code></pre>