buunguyen / mongoose-deep-populate

Mongoose plugin to enable deep population of nested models ⛺
MIT License
469 stars 44 forks source link

Cannot read property 'prototype' of undefined #27

Closed laggingreflex closed 9 years ago

laggingreflex commented 9 years ago

So I just upgraded to node v4 (on Windows 8.1 x64) and had to reinstall all modules and it seems to have broken this module. It gives the following error:

schema.plugin(deepPopulate)

TypeError: Cannot read property 'prototype' of undefined
    at module.exports (C:\~\node_modules\mongoose-deep-populate\lib\plugin.js:6:21)
    at Schema.plugin (C:\~\node_modules\mongoose\lib\schema.js:796:3)
laggingreflex commented 9 years ago

Ahh actually my bad, I didn't pass it the mongoose object which it requires now in 1.x version.