javascript - Locu-node TypeError: Cannot call method 'call' of undefined -


i'm using locu-node node.js library found here: https://github.com/locu-unofficial/locu-node, api client locu service. in example code provided, can perform query doing following:

do_search = function() {   var locu = require('locu');   var my_client = locu.menuitemclient(apikey);     my_client.search({       name:'pizza',       description:'delicious',       locality:'san francisco'     },     function(result) {       console.log(result);     }   );  exports.do_search = do_search; 

this code sitting in handler.js module call via route. when call route, error:

typeerror: cannot call method 'call' of undefined @ object.menuitemclient ... \locu.js:179:15

, locu module tries initialize menuitemclient. has used library either or run problem? doing/not doing stupid?

use new keyword.

  var my_client = new locu.menuitemclient(apikey); 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -