serverless / compose

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

"Serverless Components CLI is no longer bundled with Serverless Framework CLI" when deploying #115

Closed robertgoacher closed 2 years ago

robertgoacher 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 try to run serverless deploy or serverless info I get an error when it reaches any of the services which are using a Serverless Component.

The full error I receive is:

api › Running "serverless deploy --stage dev"
api › Serverless Components CLI is no longer bundled with Serverless Framework CLI
api › 
api › To run it, ensure it's installed:
api › npm install -g @serverless/components
api › 
api › Then run:
api › components <command> <options>

Here is the contents of my serverless-compose.yml file:

services:
  databases:
    path: databases

  api:
    path: api

The 'api' service is using the express component (https://github.com/serverless-components/express).

The api service works perfectly when I manually run serverless deploy within its directory.

Service configuration (serverless-compose.yml) content

services:
  databases:
    path: databases

  api:
    path: api

Command name and used flags

serverless info

Command output

api › Serverless Components CLI is no longer bundled with Serverless Framework CLI
api › 
api › To run it, ensure it's installed:
api › npm install -g @serverless/components
api › 
api › Then run:
api › components <command> <options>
api ›
pgrzesik commented 2 years ago

Hello @RobertGoacher - this repository is not related to components. As for the issue you're having - the message suggests what the solution is, since V3 release of the Serverless Framework, components are no longer bundled with it. You need to install them separately and run as suggested in the command output message.

I'm going to close this issue.

robertgoacher commented 2 years ago

Oh I see. 😢

It would be good if the Serverless website/documentation mentioned that Serverless Compose is not compatible with any configured services that are using Serverless Components. It would have saved me wasting my entire afternoon trying to get this set up.

pgrzesik commented 2 years ago

Sorry about that @RobertGoacher - the Compose is mentioned in Framework docs only, but we'll see if we can improve the messaging a little bit so we can avoid situations like this.