gcloud部署功能错误代码3

Pab*_*eón 6 gcloud

我正在做api.ai教程的基本实现和对话设置教程,为facebook messenger制作机器人,当我尝试使用命令部署函数时:

gcloud beta functions deploy testBot --stage-bucket testbot-e9bc4.appspot.com --trigger-http
Run Code Online (Sandbox Code Playgroud)

(其中'testBot'是项目的名称,'testbot-e9bc4.appspot.com'是bucket_name,我想..)它返回以下错误消息:

ERROR: (gcloud.beta.functions.deploy) OperationError: code=3, message=Source code size exceeds the limit
Run Code Online (Sandbox Code Playgroud)

我搜索过但没找到任何答案,我不知道错误在哪里.这是教程中出现的JS文件:

    /
 HTTP Cloud Function.

 @param {Object} req Cloud Function request context.
 @param {Object} res Cloud Function response context.
*/
exports.helloHttp = function helloHttp (req, res) {
  response = "This is a sample response from your webhook!" //Default response from the webhook to show it's working


res.setHeader('Content-Type', 'application/json'); //Requires application/json MIME type
  res.send(JSON.stringify({ "speech": response, "displayText": response 
  //"speech" is the spoken version of the response, "displayText" is the visual version
  }));
};
Run Code Online (Sandbox Code Playgroud)

she*_*kar 4

在执行命令之前,请确保您位于 go 代码所在的正确目录中gcloud beta functions deploy testBot --stage-bucket testbot-e9bc4.appspot.com --trigger-http