Spaceface16518 / strat-collector

Combs through a specific subreddit for posts with over a certain threshold in comments. It then adds them to a database.
MIT License
2 stars 0 forks source link

Cannot overwrite 'Strats' model once compiled #28

Open Spaceface16518 opened 6 years ago

Spaceface16518 commented 6 years ago

Mongo core is throwing this error:

OverWriteModelError: Cannot overwrite 'Strat' model once compiled

Strat is the model I am using for mongoose.

Here is the error text:

OverwriteModelError: Cannot overwrite `Strat` model once compiled.
    at new OverwriteModelError (/Users/AMRIT/GitHub/strat-collector/node_modules/mongoose/lib/error/overwriteModel.js:18:11)
    at Mongoose.model (/Users/AMRIT/GitHub/strat-collector/node_modules/mongoose/lib/index.js:349:13)
    at new module.exports (/Users/AMRIT/GitHub/strat-collector/modules/mongo/models/post_model.js:17:12)
    at module.exports (/Users/AMRIT/GitHub/strat-collector/modules/mongo/find-all.js:17:22)
    at Object.<anonymous> (/Users/AMRIT/GitHub/strat-collector/app.js:39:15)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Function.Module.runMain (module.js:701:10)
    at startup (bootstrap_node.js:193:16)
    at bootstrap_node.js:617:3

This bug exits as of commit d3475fcde38d5d9f008b28dd56961373a32b6022