node.js - Actions on Google number genie - assistant not defined -
i'm attempting number genie example https://developers.google.com/actions/apiai/tutorials/number-genie , i'm getting following error when run code. it's section upto test action. if comment out starts fine.
/home/pi/numbergenie/app.js:54 assistant.handlerequest(actionmap); referenceerror: assistant not defined @ object.<anonymous> (/home/pi/numbergenie/app.js:54:1)
any appreciated.
are sure you're running whole code?
from tutorial can see assistant defined in section:
app.post('/', function (request, response) { console.log('headers: ' + json.stringify(request.headers)); console.log('body: ' + json.stringify(request.body)); const assistant = new assistant({request: request, response: response}); response.sendstatus(200); // ok });
so code uses variable should in block too. hope helps.
Comments
Post a Comment