Hi Team,
I have created a new js file for getting values from external API. Configured the app.js, config.json and new JS file as per the documentation. Message node getting values using webhook but getting below error in the backed. I am using node v12.14.1. Please let me know suggestion or solutions if any.
D:\Kore.ai\BotKit>node app.js
body-parser deprecated bodyParser: use individual json/urlencoded middlewares lib\app\index.js:86:18
body-parser deprecated undefined extended: provide extended option node_modules\body-parser\index.js:105:29
app listening at http://:::8003
Error: TypeError: Expected a function
at createWrap (D:\Kore.ai\BotKit\node_modules\lodash\lodash.js:5530:15)
at Function. (D:\Kore.ai\BotKit\node_modules\lodash\lodash.js:10755:14)
at apply (D:\Kore.ai\BotKit\node_modules\lodash\lodash.js:496:27)
at Function.partialRight (D:\Kore.ai\BotKit\node_modules\lodash\lodash.js:6600:16)
at Object.runComponentHandler (D:\Kore.ai\BotKit\lib\sdk\index.js:54:76)
at D:\Kore.ai\BotKit\lib\app\routes.js:20:38
at Layer.handle [as handle_request] (D:\Kore.ai\BotKit\node_modules\express\lib\router\layer.js:95:5)
at next (D:\Kore.ai\BotKit\node_modules\express\lib\router\route.js:131:13)
at Route.dispatch (D:\Kore.ai\BotKit\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (D:\Kore.ai\BotKit\node_modules\express\lib\router\layer.js:95:5)
at D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:277:22
at param (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:349:14)
at param (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:365:14)
at param (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:365:14)
at Function.process_params (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:410:3)
at next (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:271:10)
at D:\Kore.ai\BotKit\lib\app\middlewares\APIKeyMiddleware\index.js:38:11
at Layer.handle [as handle_request] (D:\Kore.ai\BotKit\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:312:13)
at D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:280:7
at Function.process_params (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:330:12)
at next (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:271:10)
at urlencodedParser (D:\Kore.ai\BotKit\node_modules\body-parser\lib\types\urlencoded.js:82:7)
at D:\Kore.ai\BotKit\node_modules\body-parser\index.js:111:7
at D:\Kore.ai\BotKit\node_modules\body-parser\lib\read.js:129:5
at invokeCallback (D:\Kore.ai\BotKit\node_modules\raw-body\index.js:262:16)
at done (D:\Kore.ai\BotKit\node_modules\raw-body\index.js:251:7)
at IncomingMessage.onEnd (D:\Kore.ai\BotKit\node_modules\raw-body\index.js:307:7)
ERROR TypeError: Expected a function
at createWrap (D:\Kore.ai\BotKit\node_modules\lodash\lodash.js:5530:15)
at Function. (D:\Kore.ai\BotKit\node_modules\lodash\lodash.js:10755:14)
at apply (D:\Kore.ai\BotKit\node_modules\lodash\lodash.js:496:27)
at Function.partialRight (D:\Kore.ai\BotKit\node_modules\lodash\lodash.js:6600:16)
at Object.runComponentHandler (D:\Kore.ai\BotKit\lib\sdk\index.js:54:76)
at D:\Kore.ai\BotKit\lib\app\routes.js:20:38
at Layer.handle [as handle_request] (D:\Kore.ai\BotKit\node_modules\express\lib\router\layer.js:95:5)
at next (D:\Kore.ai\BotKit\node_modules\express\lib\router\route.js:131:13)
at Route.dispatch (D:\Kore.ai\BotKit\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (D:\Kore.ai\BotKit\node_modules\express\lib\router\layer.js:95:5)
at D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:277:22
at param (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:349:14)
at param (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:365:14)
at param (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:365:14)
at Function.process_params (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:410:3)
at next (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:271:10)
at D:\Kore.ai\BotKit\lib\app\middlewares\APIKeyMiddleware\index.js:38:11
at Layer.handle [as handle_request] (D:\Kore.ai\BotKit\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:312:13)
at D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:280:7
at Function.process_params (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:330:12)
at next (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:271:10)
at urlencodedParser (D:\Kore.ai\BotKit\node_modules\body-parser\lib\types\urlencoded.js:82:7)
at D:\Kore.ai\BotKit\node_modules\body-parser\index.js:111:7
at D:\Kore.ai\BotKit\node_modules\body-parser\lib\read.js:129:5
at invokeCallback (D:\Kore.ai\BotKit\node_modules\raw-body\index.js:262:16)
at done (D:\Kore.ai\BotKit\node_modules\raw-body\index.js:251:7)
at IncomingMessage.onEnd (D:\Kore.ai\BotKit\node_modules\raw-body\index.js:307:7) TypeError: Expected a function
at createWrap (D:\Kore.ai\BotKit\node_modules\lodash\lodash.js:5530:15)
at Function. (D:\Kore.ai\BotKit\node_modules\lodash\lodash.js:10755:14)
at apply (D:\Kore.ai\BotKit\node_modules\lodash\lodash.js:496:27)
at Function.partialRight (D:\Kore.ai\BotKit\node_modules\lodash\lodash.js:6600:16)
at Object.runComponentHandler (D:\Kore.ai\BotKit\lib\sdk\index.js:54:76)
at D:\Kore.ai\BotKit\lib\app\routes.js:20:38
at Layer.handle [as handle_request] (D:\Kore.ai\BotKit\node_modules\express\lib\router\layer.js:95:5)
at next (D:\Kore.ai\BotKit\node_modules\express\lib\router\route.js:131:13)
at Route.dispatch (D:\Kore.ai\BotKit\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (D:\Kore.ai\BotKit\node_modules\express\lib\router\layer.js:95:5)
at D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:277:22
at param (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:349:14)
at param (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:365:14)
at param (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:365:14)
at Function.process_params (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:410:3)
at next (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:271:10)
at D:\Kore.ai\BotKit\lib\app\middlewares\APIKeyMiddleware\index.js:38:11
at Layer.handle [as handle_request] (D:\Kore.ai\BotKit\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:312:13)
at D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:280:7
at Function.process_params (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:330:12)
at next (D:\Kore.ai\BotKit\node_modules\express\lib\router\index.js:271:10)
at urlencodedParser (D:\Kore.ai\BotKit\node_modules\body-parser\lib\types\urlencoded.js:82:7)
at D:\Kore.ai\BotKit\node_modules\body-parser\index.js:111:7
at D:\Kore.ai\BotKit\node_modules\body-parser\lib\read.js:129:5
at invokeCallback (D:\Kore.ai\BotKit\node_modules\raw-body\index.js:262:16)
at done (D:\Kore.ai\BotKit\node_modules\raw-body\index.js:251:7)
at IncomingMessage.onEnd (D:\Kore.ai\BotKit\node_modules\raw-body\index.js:307:7)
Best Regards,
Sujan