当我尝试部署到aws时,由于丢失或无效"路径"我发现错误财产。
serverless deploy -v #OR serverless run --watch
# serveless file
service:
name: aws-nodejs-ecma-script
# Add the serverless-webpack plugin
plugins:
- serverless-webpack
provider:
name: aws
runtime: nodejs6.10
functions:
events_get:
handler: get.handler
events:
- http:
method: get
path: test
答案 0 :(得分:3)
问题是这是一个糟糕的缩进。
# solution one
functions:
events_get:
handler: get.handler
events:
- http:
method: get
path: test
# solution two
functions:
events_get:
handler: get.handler
events:
- http: get test
来源: - https://forum.serverless.com/t/error-on-deploy-missing-or-invalid-path-property-in-function/2365 - https://serverless.com/framework/docs/providers/aws/guide/services#contents