moudy / agenda-ui

A UI to view Agenda jobs
267 stars 24 forks source link

Wrong release 0.0.7 #22

Open flashbag opened 8 years ago

flashbag commented 8 years ago

Steps to reproduce:

npm install agenda@0.0.7
wget https://github.com/moudy/agenda-ui/archive/v0.0.7.zip

On Github Store constructor has _collection property:

var Store = module.exports = function (agenda) {
  if (!agenda) {throw new Error('agenda is undefined. Check agenda config.');}
  this.agenda = agenda;
  this.collection = agenda._collection;
};

In downloaded package you will see property name called _db and no error throwing:

var Store = module.exports = function (agenda) {
  this.agenda = agenda;
  this.db = agenda._db;
};

Actually it doesn't work with agenda@0.7.9, request for http://localhost:3030/agenda/definitions if failing with error:

TypeError: Cannot read property 'count' of undefined
    at Store.count ({PROJECT_DIR}/node_modules/agenda-ui/lib/store.js:41:37)
    at Store.definitions ({PROJECT_DIR}/node_modules/agenda-ui/lib/store.js:69:26)
    at {PROJECT_DIR}/node_modules/agenda-ui/lib/api.js:13:11
    at Layer.handle [as handle_request] ({PROJECT_DIR}/node_modules/express/lib/router/layer.js:82:5)
    at next ({PROJECT_DIR}/node_modules/express/lib/router/route.js:100:13)
    at Route.dispatch ({PROJECT_DIR}/node_modules/express/lib/router/route.js:81:3)
    at Layer.handle [as handle_request] ({PROJECT_DIR}/node_modules/express/lib/router/layer.js:82:5)
    at {PROJECT_DIR}/node_modules/express/lib/router/index.js:234:24
    at Function.proto.process_params ({PROJECT_DIR}/node_modules/express/lib/router/index.js:312:12)
    at {PROJECT_DIR}/node_modules/express/lib/router/index.js:228:12

It happens because agenda instance has _collection property, but not _db.

voronianski commented 8 years ago

@moudy +1 please update version and push it to npm ASAP please!

sarmadsangi commented 8 years ago

any updates on this ? its broken for me as well.

flashbag commented 8 years ago

Guys, seems like @moudy stopped development of this library. There is a good alternative Agendash I'm using it for a weeks, pretty good and useful UI interface for Agenda