Q:

firebase-fuctions ,TypeError: Cannot read property 'onRequest' of undefined

updated firebase via npm i -g firebase-tools  ,
used my firebase id ,
while deploying my function at firebase ( with firebase deploy ) this error results out 
Error: Error occurred while parsing your function triggers.

TypeError: Cannot read property 'onRequest' of undefined
    at Object.<anonymous> (C:\Users\umer\Desktop\learning chatbots\usingFulfilmentAsWebhook\functions\index.js:9:34)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at C:\Users\umer\AppData\Roaming\npm\node_modules\firebase-tools\lib\triggerParser.js:15:15
    at Object.<anonymous> (C:\Users\umer\AppData\Roaming\npm\node_modules\firebase-tools\lib\triggerParser.js:53:3)

here is the code 
const functions = require('firebase-functions');

exports.webhook = functions.http.onRequest((request,response)=>{
    console.log("request.body.result.parameters", request.body.result.parameters);
    let params = request.body.result.parameters;
    response.send({
        speech: `${params.name} your hotel booking request for ${params.roomType} room is forwarded for ${params.persons} persons. We will contact you on ${params.email} soon`
    });
});

A:

try after putting "s" in http in below line
exports.webhook = functions.https.onRequest((request,response)=>{
...
}

