title: MissingSchemaError: Schema hasn't been registered for model "Review". Use mongoose.model(name, schema)
body: <p>I am new in MEAN stack development. I am developing a simple e-shopping application using node and mongoodb with angular. When I start application, I get the following error:</p>
  <blockquote>
  <p>MissingSchemaError: Schema hasn't been registered for model &quot;Review&quot;.
  Use mongoose.model(name, schema)</p>
  </blockquote>
  <p>Here is my code.</p>
  <h1>review.js</h1>
  <pre><code>const mongoose = require('mongoose');
  const Schema = mongoose.Schema;
  
  const ReviewSchema = new Schema({
      owner: { type: Schema.Types.ObjectId, ref: 'User' },
      title: String,
      description: String,
      rating: { type: Number, default: 0 },
      created: { type: Date, default: Date.now }
  });
  
  module.exports = mongoose.model('Review', ReviewSchema);
  </code></pre>
  <h1>product.js</h1>
  <pre><code>const mongoose = require(&quot;mongoose&quot;);
  const deepPopulate = require(&quot;mongoose-deep-populate&quot;)(mongoose);
  const Schema = mongoose.Schema;
  const mongooseAlgolia = require(&quot;mongoose-algolia&quot;);
  
  const ProductSchema = new Schema({
    category: { type: Schema.Types.ObjectId, ref: &quot;Category&quot; },
    owner: { type: Schema.Types.ObjectId, ref: &quot;User&quot; },
    reviews: [{ type: Schema.Types.ObjectId, ref: &quot;Review&quot; }],
    image: String,
    title: String,
    description: String,
    price: Number,
    created: { type: Date, default: Date.now }
  });
  
  module.exports = mongoose.model(&quot;Product&quot;, ProductSchema);
  </code></pre>
  <h1>config.js</h1>
  <pre><code>module.exports = {
      database :'mongodb://localhost:27017/dabdatabase',
      port: process.env.PORT || 3000,
      secret: 'ganesh123'
  };
  </code></pre>
  <p>Please help me.</p>