title: .save() is not a Function Mongoose
body: <p>I keep getting an issue that newUser.save() is not a function. This is a mongoose function that I have used before. I required mongoose correctly and am unsure of why this error is occurring. Any help is welcomed.</p>
  
  <p>The error I am getting is <code>TypeError: newUser.save is not a function
  </code></p>
  
  <p><strong>My user.js inside the Models Folder</strong></p>
  
  <pre><code>var mongoose = require('mongoose');
  var bcrypt = require('bcryptjs');
  var Schema = mongoose.Schema;
  
  var UserSchema = new Schema({
    name: String,
    email: String,
    password: String,
    info: String
  });
  
  var User = module.exports = mongoose.model('User', UserSchema);
  
  module.exports.createUser = function(newUser, callback){
      bcrypt.genSalt(10, function(err, salt) {
          bcrypt.hash(newUser.password, salt, function(err, hash) {
              newUser.password = hash;
              newUser.save(callback);
          });
      });
  }
  
  module.exports.getUserByUsername = function(username, callback){
      User.findOne({username : username}, callback);
  }
  
  module.exports.getUserById = function(id, callback){
      User.findById(id, callback);
  }
  
  module.exports.checkPassword = function(candidatePass, hash, callback){
    bcrypt.compare(candidatePass, hash, function(err, res) {
      if(err) throw err;
      callback(null, res);
    });
  }
  </code></pre>
  
  <p><strong>My users.js inside the Routes Folder</strong></p>
  
  <pre><code>//Mongoose Setup
  var mongoose = require('mongoose');
  var Schema = mongoose.Schema;
  mongoose.connect("MY_DB");
  var path = require('path');
  var appDir = path.dirname(require.main.filename);
  var bodyParser = require('body-parser')
  var User = require('../models/user.js');
  
  //Express Setup
  var express = require('express');
  var router = express.Router();
  var app = express();
  var expressValidator = require("express-validator");
  
  app.use(bodyParser.urlencoded({ extended: false }));
  app.use(expressValidator());
  app.use(bodyParser.json());
  
  //Routes
  router.get('/register', function(req, res){
    res.sendFile(appDir + "/views/register.html");
  })
  
  router.post('/register', function(req, res) {
    req.check('name', 'Name must be Filled in').notEmpty();
    req.check('email', 'Email must be Filled in').notEmpty();
    req.check('email', "Invalid Email").isEmail();
    req.check('password', 'Password Field must be Filled in').notEmpty();
    req.check('password', 'Passwords do not Match').equals(req.body.password2)
    var errors = req.validationErrors();
    if(errors) res.send(errors)
    else{ User.createUser({
      name: req.body.name,
      email: req.body.email,
      password: req.body.password,
      info: req.body.user_bio
    }, function(){
      console.log('User Created');
    })
  }
  })
  
  //Exports
  module.exports = router;
  </code></pre>