Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agendash not working #60

Open
alcalawil opened this issue Dec 23, 2024 · 0 comments
Open

Agendash not working #60

alcalawil opened this issue Dec 23, 2024 · 0 comments

Comments

@alcalawil
Copy link

When I install Agendash the app runs, but when I go to http://localhost:3008/dash/ I get below error:

Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'collection')
   at getOverview (/Users/alcalawil/vemos/repos/cronjobs/node_modules/agendash/lib/controllers/agendash.js:126:43)
   at api (/Users/alcalawil/vemos/repos/cronjobs/node_modules/agendash/lib/controllers/agendash.js:263:7)
   at <anonymous> (/Users/alcalawil/vemos/repos/cronjobs/node_modules/agendash/lib/middlewares/express.js:30:33)
   at handle ...

I solved it by manually setting _collection just before injecting agenda to Agendash

agenda._collection = agenda.db.collection;
app.use('/dash', Agendash(agenda));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant