Issue description
Bug Description
Deploying a Fargate container service fails with internal Zod validation error.
Error
TypeError: Cannot read properties of undefined (reading '_zod')
at Object.inst._zod.parse (/home/hello/.serverless/releases/4.31.1/engine/node_modules/zod/v4/core/schemas.js:1400:46)
Environment
- Serverless Framework: 4.31.1
- Node.js: 20.20.0
- OS: Ubuntu
- Config file: serverless.containers.yml
Config (minimal reproduction)
org: spacemonk
name: fargate
deployment:
type: [email protected]
containers:
service-sync:
src: ./
routing:
pathPattern: /*
pathHealthCheck: /_internal_health_check
compute:
type: awsFargateEcs
awsFargateEcs:
memory: 8192
cpu: 1024
scale:
- type: desired
desired: 2
Steps to Reproduce
- Create serverless.containers.yml with Fargate config
- Run
serverless deploy --stage bbprod
- Error occurs during packaging
Expected Behavior
Deployment should proceed without internal Zod parsing errors.
Workaround Attempted
- Cleared ~/.serverless cache
- Downgraded Node from v24 to v20
- Simplified config (removed variable interpolation)
- None resolved the issue
Context
No response