koa-mongoose icon indicating copy to clipboard operation
koa-mongoose copied to clipboard

Can you update your code on NPM

Open xchengxing opened this issue 6 years ago • 3 comments

your github code is newest, but npm is not. can you update your code on npm. thanks very much.

xchengxing avatar May 15 '18 10:05 xchengxing

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)

atjiu avatar Sep 27 '18 06:09 atjiu

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 👍

South-Paw avatar Jun 13 '19 06:06 South-Paw

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.

cecilcosta avatar Jun 15 '19 16:06 cecilcosta