Actions on google Google助手-部署第一个应用程序时出错

Actions on google Google助手-部署第一个应用程序时出错,actions-on-google,dialogflow-es,Actions On Google,Dialogflow Es,我正在尝试在Google应用程序上部署我的第一个操作。我正在使用Dialogflow和Firebase函数,并使用以下命令进行部署: firebase deploy --only functions 但我收到以下消息和错误: === Deploying to 'sillynamemaker-2369c'... i deploying functions i functions: ensuring necessary APIs are enabled... i runtimeconfi

我正在尝试在Google应用程序上部署我的第一个操作。我正在使用Dialogflow和Firebase函数,并使用以下命令进行部署:

firebase deploy --only functions
但我收到以下消息和错误:

=== Deploying to 'sillynamemaker-2369c'...

i  deploying functions i  functions: ensuring necessary APIs are enabled... i  runtimeconfig: ensuring necessary APIs are enabled... ✔  runtimeconfig: all necessary APIs are enabled ✔  functions: all necessary APIs are enabled i  functions: preparing functions directory for uploading...

Error: Error occurred while parsing your function triggers.

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/tmp/fbfn_8461HDxPA7uUADKA/index.js:4:13)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
==部署到“sillynamemaker-2369c”。。。
部署功能:确保启用必要的API。。。i runtimeconfig:确保启用必要的API。。。✔  runtimeconfig:所有必要的API都已启用✔  功能:所有必要的API都已启用i功能:准备要上载的功能目录。。。
错误:分析函数触发器时出错。
SyntaxError:意外标记{
在exports.runInThisContext(vm.js:53:16)
在模块处编译(Module.js:373:25)
在Object.Module.\u extensions..js(Module.js:416:10)
在Module.load(Module.js:343:32)
在Function.Module.\u加载(Module.js:300:12)
at Module.require(Module.js:353:17)
根据需要(内部/module.js:12:17)
at对象。(/tmp/fbfn_8461HDxPA7uUADKA/index.js:4:13)
在模块处编译(Module.js:409:26)
在Object.Module.\u extensions..js(Module.js:416:10)

您是否编辑过任何.js文件?此错误强烈表明它试图解析JavaScript文件,但您输入的内容中存在语法错误


如果您键入
node index.js
,您可能会更好地了解语法错误在哪里。

您认为它会出现在stacktrace中
at Object的第4行。(/tmp/fbfn\u 8461HDxPA7uUADKA/index.js:4:13)
?您很可能只是代码中有语法错误,正如错误所示。