koa-mongoose
koa-mongoose copied to clipboard
Can you update your code on NPM
your github code is newest, but npm is not. can you update your code on npm. thanks very much.
i install and run , it throw an error
/Users/h/demo/node_modules/koa-mongoose/lib/mongoose.js:68
db.open(options.host, database, options.port, options)
^
TypeError: db.open is not a function
at Function.middleware.open (/Users/h/demo/node_modules/koa-mongoose/lib/mongoose.js:68:8)
at module.exports.options (/Users/h/demo/node_modules/koa-mongoose/lib/mongoose.js:26:16)
at Object.<anonymous> (/Users/h/demo/app.js:19:9)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/h/demo/bin/www:7:11)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:266:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
I know this issues a little old, but I've done my own version of this package that is up to date - https://github.com/South-Paw/koa-mongoose hopefully it solves your problems 👍
True, the current version of this repository doesn't work anymore. I don't know if this repository has been abandoned but using South-Paw's solution solves the problem. @South-Paw thansk for your solution, people like you make a better world.