serverless / compose

Orchestrate Serverless Framework in monorepos
https://serverless.com/framework/docs/guides/compose
MIT License
110 stars 15 forks source link

Serverless compose throws an error Impossible to parse the output of "serverless info": #145

Closed fuzzy28 closed 2 years ago

fuzzy28 commented 2 years ago

Are you certain it's a bug?

Are you using the latest version?

Is there an existing issue for this?

Issue description

When I run sls deploy --stage stg to my serverless-compose.ts, it throws an error Impossible to parse the output of "serverless info": and skip the next service.

Service configuration (serverless-compose.yml) content

const serverlessCompose = {
    services: {
        infra: {
            path: "../app-infra"
        },

        service1: {
            path: "../app-service1",
            dependsOn: ["infra"]
        }
    }
}

module.exports = serverlessCompose;

Command name and used flags

sls deploy --stage stg

Command output

Impossible to parse the output of "serverless info":
Service Information
service: app-infra
stage: stg
region: ap-southeast-1
stack: app-infra-stg
resources: 22
api keys:
  None
endpoints:
functions:
  None
layers:
  None

Stack Outputs
APIGatewayRestApiRootResourceId: xxxx
ApiGatewayRestApiId: xxxx
CognitoUserPoolApplicationUserPoolId: xxxx
CognitoUserPoolApplicationUserPoolClientId: xxxx
APIGatewayCognitoAuthorizer: xxxx
CognitoUserPoolARN: xxxx
ServerlessDeploymentBucketName: xxxx

infra >     at ServerlessFramework.retrieveOutputs (xxxxx-path-serverless-compose\node_modules\@serverless\compose\components\framework\index.js:307:11)
infra >     at processTicksAndRejections (node:internal/process/task_queues:96:5)
infra >     at async ServerlessFramework.deploy (xxxxx-path-serverless-compose\node_modules\@serverless\compose\components\framework\index.js:92:40)
infra >     at async fn (xxxxx-path-serverless-compose\node_modules\@serverless\compose\src\ComponentsService.js:519:11)
service1> skipped
pgrzesik commented 2 years ago

Hello @fuzzy28 - I just wanted to ask, did you manage to resolve your issue?

fuzzy28 commented 2 years ago

@pgrzesik i forgot the upgrade both local and global serverless version.

pgrzesik commented 2 years ago

Thanks for letting us know @fuzzy28 🙇

ahmed-sharief5 commented 1 year ago

I am using serverless latest version and even serverless-compose latest version. But still facing this issue when running in github actions

ahmed-sharief5 commented 1 year ago

@fuzzy28 @pgrzesik Could you please let me know how you guys resolved this issue. Because of this issue my deployment is pending

Christop406 commented 1 year ago

There is a workaround here, you can run the command with FORCE_COLOR=0, like FORCE_COLOR=0 serverless <project>:deploy