title: MissingSchemaError: Schema hasn't been registered for model “Marker”
body: <p>I am working on a project with Javascript, Node,CSS,HTML and Google Maps. 
  I recently got this error => MissingSchemaError: Schema hasn't been registered for model "Marker". I ve tried everything I could to solve it but nothing seems to work.</p>
  
  <p>This is the model for my markers:</p>
  
  <pre><code>const mongoose = require("mongoose");
  const mongo = require("../connectors/mongo");
  const Joi = require("Joi");
  
  const markerSchema = new mongoose.Schema(
    {
      _id: String,
      lat: { type: Number, required: true },
      lng: { type: Number, required: true },
      date: { type: Date, default: Date.now, required: false },
      pictures: { type: [String], required: true },
      user_id: { type: String, required: true }
    },
    { timestamps: true }
  );
  
  /* Create the model from the schema. */
  const Marker = mongoose.model("Marker", markerSchema);
  exports.Marker = Marker;
  </code></pre>
  
  <p>For my routes I have a folder routes that has a folder markers and a folder for users. 
  The folder marker has these three things:
  Folder users is similar.
  handlers.js:</p>
  
  <pre><code>const Marker = require("mongoose").model("Marker");
  
  const find = (req, res) =&gt; {
    ...
  };
  
  ...
  module.exports = {
    create,
    deletion,
    find,
    findById,
    update
  };
  </code></pre>
  
  <p>index.js:</p>
  
  <pre><code>const checkAuth = require("../../middlewares/check-auth.js");
  const handlers = require("./handlers");
  const validators = require("./validators");
  
  module.exports = router =&gt; {
    router.get("/markers", checkAuth, validators.find, handlers.find);
    router.post("/markers", checkAuth, validators.create, handlers.create);
    router.get("/markers/:id", checkAuth, validators.find, handlers.findById);
    router.put("/markers/:id", checkAuth, validators.update, handlers.update);
    router.delete(
      "/markers/:id",
      checkAuth,
      validators.deletion,
      handlers.deletion
    );
    return router;
  };
  </code></pre>
  
  <p>and validators.js</p>
  
  <pre><code>const { celebrate, Joi } = require("celebrate");
  
  const find = celebrate({
    ...
  });
  
  ...
  
  module.exports = {
    find,
    findOne,
    create,
    update,
    deletion
  };
  </code></pre>
  
  <p>The folder routes also has an index.js with this:</p>
  
  <pre><code>const markers = require("./markers");
  const users = require("./users");
  
  const resourceRoutes = [markers, users];
  
  module.exports = router =&gt; {
    resourceRoutes.forEach(routes =&gt; routes(router));
    return router;
  };
  </code></pre>
  
  <p>Any suggestions on what could be causing the problem?</p>