Dialogflow-fulfillment-nodejs: TypeError: Right-hand side of 'instanceof' is not an object

Created on 9 Jul 2018  路  1Comment  路  Source: dialogflow/dialogflow-fulfillment-nodejs

I had a working code using Express.JS.
Now it throws this error when calling agent.add("<MESSAGE>")
The code is present here #81

Node version - v8.11.3
NPM version - 6.1.0

ERROR

TypeError: Right-hand side of 'instanceof' is not an object
    at WebhookClient.addResponse_ (/Users/abhinavtyagi/Documents/workspace/workspace_js/CVS_Google_Assistant/DialogflowAgent/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:238:18)
    at WebhookClient.add (/Users/abhinavtyagi/Documents/workspace/workspace_js/CVS_Google_Assistant/DialogflowAgent/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:225:12)
    at welcome (/Users/abhinavtyagi/Documents/workspace/workspace_js/CVS_Google_Assistant/DialogflowAgent/server.js:14:11)
    at WebhookClient.handleRequest (/Users/abhinavtyagi/Documents/workspace/workspace_js/CVS_Google_Assistant/DialogflowAgent/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:273:44)
    at WebhookProcessing (/Users/abhinavtyagi/Documents/workspace/workspace_js/CVS_Google_Assistant/DialogflowAgent/server.js:31:11)
    at /Users/abhinavtyagi/Documents/workspace/workspace_js/CVS_Google_Assistant/DialogflowAgent/server.js:38:5
    at Layer.handle [as handle_request] (/Users/abhinavtyagi/Documents/workspace/workspace_js/CVS_Google_Assistant/DialogflowAgent/node_modules/express/lib/router/layer.js:95:5)
    at next (/Users/abhinavtyagi/Documents/workspace/workspace_js/CVS_Google_Assistant/DialogflowAgent/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/Users/abhinavtyagi/Documents/workspace/workspace_js/CVS_Google_Assistant/DialogflowAgent/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/Users/abhinavtyagi/Documents/workspace/workspace_js/CVS_Google_Assistant/DialogflowAgent/node_modules/express/lib/router/layer.js:95:5)

Most helpful comment

Solved using "actions-on-google": "^2.2.0" along with dialogflow

>All comments

Solved using "actions-on-google": "^2.2.0" along with dialogflow

Was this page helpful?
0 / 5 - 0 ratings

Related issues

malikasinger1 picture malikasinger1  路  7Comments

newtonmunene99 picture newtonmunene99  路  3Comments

drishit96 picture drishit96  路  6Comments

zamil89 picture zamil89  路  4Comments

omfd picture omfd  路  6Comments