serverless-components/tencent-scf

上传代码时报错

TMaize opened this issue · 6 comments

错误信息
The "path" argument must be of type string. Received type object

Tencent Serverless Toolkit for VS Code版本为v2.0.2

serverless.yaml配置如下

src:
  src: './'
  exclude:
    - 'node_modules/**'

vs code 插件支持component v2的规范,按这个规范写serverless.yaml试试
https://github.com/serverless-components/tencent-scf/blob/v2/doc/configure.md

就是按照文档写的,发现好像只支持第一种写法

1592374546(1)

完整yaml贴一下看看

app: render
component: scf
inputs:
  cls:
    logsetId: ''
    topicId: ''
  description: 使用puppeteer渲染图片和pdf
  enableRoleAuth: true
  events:
    - apigw:
        name: SCF_API_Service
        parameters:
          endpoints:
            - function:
                functionQualifier: $LATEST
                isIntegratedResponse: true
              method: ANY
              path: /render
          environment: test
          protocols:
            - http
            - https
          serviceId: service-px5t89qd
  handler: index.main_handler
  memorySize: 768
  name: render
  namespace: default
  region: ap-shanghai
  runtime: Nodejs12.16
  src:
    src: './'
    exclude:
      - 'node_modules/**'
  timeout: 900
  vpcConfig:
    subnetId: ''
    vpcId: ''
name: ap-shanghai_default_render
org: '1252268527'
stage: dev
# For more information: https://github.com/serverless-components/tencent-scf/blob/v2/doc/configure.md

I see, 是有点问题,感谢反馈,我fix一下

已发布2.0.3版本插件,升级可解决此问题 @yugasun close一下issue吧