2013-07-17 126 views
0

這是在我的Web瀏覽器中localue:6379/active中的kue ui中的錯誤。在嘗試運行時出現在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 ...

回答

1

嘗試改變順序是這樣的:

var kue = require('kue'), 
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 job = kue.job; 

你不想,直到Redis的客戶端設置爲啓動KUE。

+0

我已經改變了順序,但仍然誤差persisting.The KUE UI仍給予同樣的error.am我正確地創建工作? – sinha

0

我想我現在看到了這個問題。 Kue需要在不同於Redis界面的端口上運行。嘗試kue.app.listen(4000);並連接到

http://localhost:4000 
+0

當kue和redis端口不同時,我得到一個Redis連接到127.0.0.1:6389失敗 - 連接ECONNREFUSED.Does初始化kue ui必須在不同的js ..? – sinha

+0

他們需要不同的端口。 6379是Redis端口。您需要將Kue Express應用程序置於不同的端口以查看管理界面。 – dankohn

相關問題