I am using usergrid module of node.js on my one machine, but now I got my new laptop, and installed all the required packages on laptop, but here the execution of usergrid module fails, while the same code and same modules gets executed on my machine.
Can anyone help me with this?
and what I am trying to execute is below.
app.get('/discovery', function(req, res, next) {
var providerId = req.query.providerId;
discovery(providerId, function(error, result){
if(error){
res.json(error);
}else{
res.json(result);
}
});
});
The error that comes is :
D:\REPOS\Exchange>node main.js calling: GET https://api.usergrid.com/abc/test/abc_servers D:\REPOS\Exchange\node_modules\usergrid\lib\usergrid.js:112 r.body = r.body || {}; TypeError: Cannot read property 'body' of undefined