Skip to content

s2tos3 命令无法作用于含有 extend 字段的 s-prod.yaml #50

@DevDengChao

Description

@DevDengChao
# s.yaml
# https://github.com/devsapp/fc/blob/main/docs/zh/yaml/
edition: 1.0.0
name: www.example.com
services:
  default:
    component: devsapp/fc
    props:
      region: cn-shenzhen
      service:
        name: www-e2e-test
      function:
        name: www
        handler: dummy-handler
        timeout: 6
        runtime: custom.debian10
        environmentVariables:
          TZ: Asia/Shanghai
          NODE_ENV: e2e-test
          PATH: /var/fc/lang/nodejs20/bin:$PATH
        instanceConcurrency: 100
        codeUri: ./.output
        customRuntimeConfig:
          command: ["node"]
          args: ["./server/index.mjs"]
        caPort: 3000
      triggers:
        - name: http
          type: http
          config:
            authType: anonymous
            methods: [HEAD, GET]
# s-prod.yaml
# https://github.com/devsapp/fc/blob/main/docs/Others/yaml.md
edition: 1.0.0
extend: s.yaml
services:
  default:
    props:
      service:
        name: www

s cli fc3 s2tos3 --source .\s-prod.yaml --target s3-prod.yaml

(node:24660) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[2025-03-14 14:44:28][INFO][fc3] transform E:\www\s-prod.yaml  =====>  E:\www\s3-prod.yaml
 
Error Message:
Cannot read properties of undefined (reading 'startsWith')

A complete log of this run can be found in: C:\Users\Admin\.s\logs\0314144428

Env:       @serverless-devs/s: 3.1.6, win32-x64 node-v22.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions