Google助手 - 部署第一个应用时出错

时间:2017-11-28 22:42:40

标签: actions-on-google dialogflow

我正在尝试在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)

1 个答案:

答案 0 :(得分:1)

你编辑过任何.js文件吗?此错误强烈表明它正在尝试解析JavaScript文件,但您输入的内容存在语法错误。

如果您输入node index.js,您可能会更好地了解语法错误的位置。