title: var express = require("express"); returns undefined
body: <p>I am new to node.js and pulling data dynamically through a server. I am attempting to connect to my DB and pull in comments that are stored there. I have tried several different answers (found on stackoverflow) to solve my problem, but none of them worked. For some reason var express = require("express"); returns undefined</p>
  
  <p><strong>Server.js</strong></p>
  
  <pre><code>var express = require("express");
  var mysql = require("mysql");
  var app = express();
  
  var connection  =     mysql.createConnection({
      host : "localhost",
      user : "root",
      password : "root",
      database : "moviewer"
  });
  
  connection.connect(function(error) {
      if(error) {
          console.log("Problem with MySQL"+error);
      } else {
          console.log("Connected with Database");
      }
  });
  
  app.use(express.session());
  
  app.listen(8888,function() {
      console.log("It's Started on PORT 8888");
  });
  
  app.get('/',function(req,res) {
      res.sendfile('index.html');
  });
  
  app.get('/load',function(req,res) {
      connection.query("SELECT * from movie-reviews",function(err,rows){
          if(err) {
              console.log("Problem with MySQL"+err);
          } else {
              res.end(JSON.stringify(rows));
          }
      });
  });
  </code></pre>
  
  <p><strong>package.json</strong></p>
  
  <pre><code>{
    "name": "Moviewer",
    "version": "1.0.0",
    "dependencies": {
      "express": "^4.12.2",
      "mysql": "~2.5.0"
    }
  }
  </code></pre>