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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -