Dialogflow es Serverless:您的Serverless.yml具有一个键为“的无效值”;参考「;

Dialogflow es Serverless:您的Serverless.yml具有一个键为“的无效值”;参考「;,dialogflow-es,serverless-framework,alexa-skill,serverless,serverless-plugins,Dialogflow Es,Serverless Framework,Alexa Skill,Serverless,Serverless Plugins,使用以下命令安装serverless时 sls插件安装-n无服务器alexa技能——舞台开发 我收到一个错误,如Your serverless.yml的键为:“Ref” 下面是我的示例serverless.yml文件 plugins: - serverless-webpack - serverless-s3-sync - serverless-plugin-git-variables - serverless-alexa-skills functions: ${file(./deploy/${

使用以下命令安装serverless时
sls插件安装-n无服务器alexa技能——舞台开发

我收到一个错误,如
Your serverless.yml的键为:“Ref”

下面是我的示例serverless.yml文件

plugins:
- serverless-webpack
- serverless-s3-sync
- serverless-plugin-git-variables
- serverless-alexa-skills

functions: ${file(./deploy/${opt:stage}.yml):functions}
resources: ${file(./deploy/${opt:stage}.yml):resources}
custom: ${file(./deploy/${opt:stage}.yml):custom}

outputs:
DialogflowFunctionArn:
Value:
  Ref: 

这里有个街区。有人能帮我吗。

。它需要引用一个资源。整个
输出
部分也是可选的,仅当您需要从一个堆栈中引用另一个堆栈中的资源时才使用它。

。它需要引用一个资源。整个
输出
部分也是可选的,仅当您需要从一个堆栈中引用另一个堆栈中的资源时才使用它。

它基本上说Ref:需要一个值。您已对其进行了定义,但未为其指定任何值。如果没有用处,则应从代码中删除此部分:

outputs:
DialogflowFunctionArn:
Value:
  Ref:

它基本上说Ref:需要一个值。您已对其进行了定义,但未为其指定任何值。如果没有用处,则应从代码中删除此部分:

outputs:
DialogflowFunctionArn:
Value:
  Ref:

Ref希望引用某些内容,但现在您没有将任何内容传递给reference

因此,假设您需要DialogflowFunction的ARN,并且函数配置在函数文件中类似于以下内容:

DialogflowFunction:
  description: get the flow
  handler: src/functions/dialog-controller.flow
  events:
    - http:
        path: '/dialog/flow'
        method: get
        cors: true
那么您的ref将如下所示:

outputs:
DialogflowFunctionArn:
Value:
  Ref: DialogflowFunction

Ref
获取您要引用的资源的逻辑id,在本例中为
DialogflowFunction
,并将返回该资源的ARN。

Ref希望引用某个内容,但现在您没有传递任何要引用的内容

因此,假设您需要DialogflowFunction的ARN,并且函数配置在函数文件中类似于以下内容:

DialogflowFunction:
  description: get the flow
  handler: src/functions/dialog-controller.flow
  events:
    - http:
        path: '/dialog/flow'
        method: get
        cors: true
那么您的ref将如下所示:

outputs:
DialogflowFunctionArn:
Value:
  Ref: DialogflowFunction

Ref
获取要引用的资源的逻辑id,在本例中为
DialogflowFunction
,并将返回该资源的ARN。

我尝试对齐Ref关键字。但是没有用。我试着对齐Ref关键字。但是没有用。