serverless / compose

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

TypeError: component.logVerbose is not a function #129

Closed TastefulElk closed 2 years ago

TastefulElk 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

The refactor in version 1.1.0 seems to have broken all service-specific compose commands. Verified that the exact same commands and exact same config work in 1.0.3

Service configuration (serverless-compose.yml) content

services:
  service-a:
    path: service-a

Command name and used flags

serverless service-a:logs

Command output

$ /Users/seb/code/blogs/stateful-stack/bug-repo/node_modules/.bin/serverless-compose service-a:logs
Environment: darwin, node 16.13.1, compose 1.1.0
Docs:        slss.io/docs-compose
Bugs:        github.com/serverless/compose/issues

Error:
TypeError: component.logVerbose is not a function
    at ComponentsService.invokeComponentCommand (/Users/seb/code/blogs/stateful-stack/bug-repo/node_modules/@serverless/compose/src/ComponentsService.js:392:17)
    at async runComponents (/Users/seb/code/blogs/stateful-stack/bug-repo/node_modules/@serverless/compose/src/index.js:133:7)
pgrzesik commented 2 years ago

Thanks a lot for detailed report @TastefulElk - I have a fix ready, it will be published soon

pgrzesik commented 2 years ago

Update: fix published with v1.1.1 - sorry for the trouble @TastefulElk

TastefulElk commented 2 years ago

Thanks for the quick fix!

mnapoli commented 2 years ago

Hey @TastefulElk just noticed your Slack message as well, thanks for the report and @pgrzesik for the quick fix, I must confess that was all my fault 😅