这是我的网络浏览器中 localhost:6379/active 的 kue ui 中的错误。
TypeError:
E:\development\workspace\wmtservices\node_modules\kue\lib\http\views\_filter.jade:3
1| select#filter
2| option(value='') filter by
> 3| - each type in types
4| option(value=type)= type
Cannot read property 'length' of undefined
at jade.debug.unshift.lineno (eval at <anonymous> (E:\development\workspace\wmtservices\node_modules\jade\lib\jade.js:166:8), <anonymous>:234:31)
at eval (eval at <anonymous> (E:\development\workspace\wmtservices\node_modules\jade\lib\jade.js:166:8), <anonymous>:265:4)
at E:\development\workspace\wmtservices\node_modules\jade\lib\jade.js:167:35
at Object.exports.render (E:\development\workspace\wmtservices\node_modules\jade\lib\jade.js:201:14)
at View.exports.renderFile [as engine] (E:\development\workspace\wmtservices\node_modules\jade\lib\jade.js:228:13)
at View.render (E:\development\workspace\wmtservices\node_modules\express\lib\view.js:75:8)
at Function.app.render (E:\development\workspace\wmtservices\node_modules\express\lib\application.js:503:10)
at ServerResponse.res.render (E:\development\workspace\wmtservices\node_modules\express\lib\response.js:755:7)
at Command.callback (E:\development\workspace\wmtservices\node_modules\kue\lib\http\routes\index.js:23:11)
at RedisClient.flush_and_error (E:\development\workspace\wmtservices\node_modules\redis\index.js:117:25)
*这是钛写的js文件中的代码*
var kue = require('kue'),
job = kue.job,
redis = require('redis');
// creating redis client....
kue.redis.createClient = function(){
var client = redis.createClient('6379','127.0.0.1',{no_ready_check: true});
return client;
};
var jobs = kue.createQueue();
var job = jobs.create('test', {
title: 'matching twins'
}).priority('high').save();
这是 kue 的 ui 部分...
// start the UI
kue.app.listen(6379);
console.log('UI started on port 6379');
即使没有初始化工作,我也会在 kue ui 中遇到同样的错误......