Comments (7)
If you're encountering this because you reuse your Mongoose connection, this worked for me:
const agenda = new Agenda({ mongo: mongoose.connection });
agenda._mdb.admin = () => agenda._mdb.db.admin();
const dashboard = Agendash(agenda);
The important part is that admin is not available in _mdb
but in _mdb.db
.
from agendash.
@lautarobock @alanhr @simison @alexkwolfe @loris
I'm also getting the same error
error: TypeError: agenda._mdb.admin is not a function
at Agenda.<anonymous> (/node_modules/agendash/lib/agendash.js:18:17)
Fixed it by commenting : /node_modules/agendash/lib/agendash.js
// agenda._mdb.admin().serverInfo((err, serverInfo) => {
// if (err) {
// throw err;
// }
// if (!semver.satisfies(serverInfo.version, '>=2.6.0')) {
// console.warn('Agendash requires mongodb version >=2.6.0.');
// }
// });
Agenda and Agendash both are working - see logs
info: Connected to MongoDB
info: Listening to port 3000
info: agenda is ready.
info: GET /dash 301 - 18.041 ms
info: GET /dash/ 200 - 16.431 ms
info: GET /dash/css/dashboard.css 200 - 10.017 ms
info: GET /dash/js/backbone-min.js 200 - 14.723 ms
info: GET /dash/js/lodash.min.js 200 - 10.859 ms
info: GET /dash/css/bootstrap.min.css 200 - 11.948 ms
info: GET /dash/js/jquery-2.2.0.min.js 200 - 11.088 ms
info: GET /dash/js/bootstrap.min.js 200 - 10.620 ms
info: GET /dash/js/moment.min.js 200 - 28.322 ms
info: GET /dash/js/main.js 200 - 13.614 ms
info: GET /dash/api 200 - 28.634 ms
info: GET /dash/api 304 - 5.640 ms
info: GET /dash/api 304 - 3.650 ms
info: GET /dash/api 304 - 5.134 ms
info: GET /dash/api 304 - 4.437 ms
from agendash.
Thanks @RomainVernoux
Your fix was incorporated into Agendash in #68.
from agendash.
Hey guys, any update about this ?
from agendash.
Thanks for the fix @hariom282538 !
It's working like a charm in development where I can comment Node Modules but how do you do in production ? I'm using Heroku and I don't know any way to do this trick there.
from agendash.
I see your pull request failed @hariom282538, how can I help solve the issue ?
from agendash.
@thibaultchazal Code merge check passed without any conflict, build job failed because of some other issues. Only agendas people can help us. Meanwhile clone this codebase makes changes as suggested by me earlier and push that to your private NPM repo. And use that while [npm install].
I used this - https://verdaccio.org/
from agendash.
Related Issues (20)
- Why are these jobs still marked as "running"? HOT 3
- Agendash not loading properly HOT 1
- [Bug] Agenda 4.2.1 produces an error on Agendash when rescheduling a job HOT 11
- Cant delete schedule HOT 4
- Invalid date is showed on completed jobs HOT 1
- Suggestion: Support setting repeatTimezone when scheduling a job HOT 1
- Mongodb latest version problem HOT 1
- Does the "Refresh Interval" really work? HOT 4
- Can't connect to MongoDB Atlas anymore HOT 4
- Support for ARM64 docker images and v3 HOT 2
- Readonly mode HOT 1
- Is this repo maintained? HOT 2
- Error 404 for "api/jobs/requeue" and "api/jobs/delete" HOT 5
- not working with express HOT 3
- Typescript types
- How to support Typescript language?
- Multiple job deletion button is not working when have more jobs
- Not working with fastify + prefix HOT 2
- Error "QueryExceededMemoryLimitNoDiskUseAllowed" with V4.0 HOT 2
- Error: CDN files for popper and vue etc not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agendash.