2017-09-06 62 views
1

我一直在关注this教程以部署一个函数,该函数将充当我的API.ai机器人的Webhook并为我的生活无法部署功能:尝试在Google Cloud Platform上部署API.ai的功能时出错webhook

gcloud beta functions deploy helloHttp --stage-bucket [BUCKET_NAME] --trigger-http 

我也尝试这种不同的变化:

gcloud beta functions deploy weather --stage-bucket staging.weather-abc12.appspot.com --trigger-http 

helloHttp:如果我创建了一个叫做天气与谷歌ID的API.ai项目,是天气ABC12哪一个应该是?

--stage-bucket:应该是怎么样的?当我去谷歌云存储时,我发现这个:weather-abc12.appspot.com

然后我从上面的链接粘贴的index.js文件有一个名为helloHttp的函数,所以我改变了天气,weather-abc12(试过了很多事情...)然后我得到这个终端:

(gcloud.beta.functions.deploy) OperationError: code=3, message=Function load error: Node.js module defined by file index.js is expected to export function named weather 

我的问题是相似的另一个贴here它没有得到任何答案unfortunateley。

回答

2

它现在工作!我实际上正在编辑错误的index.js文件,这就是为什么即使我改变了函数名称,终端会说它不匹配。我的错!

相关问题