2

I'm initializing Moonmail and following the readme, executing the following command:

sls project init -c -n your-lower-case-project-name

I'm getting the following:

Command "project" not found, Run "serverless help" for...

It seems that Serverless no longer has the "project" command (since version 0.5) and it has been replaced with "service" (which works a little differently).

What would be the way forward here?

Asaf
  • 8,106
  • 19
  • 66
  • 116

1 Answers1

4

Although they say that Moonmail supports version 0.5.2 or higher, it's not true. You need to use version 0.5x of the Serverless Framework and you can't use any version 1.x because 1.x is a complete rewrite.

Unfortunately, the solution is to uninstall the current Serverless Framework and install an old version.

npm -g uninstall serverless  
npm -g install serverless@0.5.6
Zanon
  • 29,231
  • 20
  • 113
  • 126
  • How difficult would it be to modify the repository to support Serverless 1.x? Is there a straightforward way? Otherwise, is there a way to switch back-and-forth with a global NPM package? – Asaf Jun 21 '17 at 15:57
  • 1
    [Migrating from 0.5x to 1.0x](https://serverless.com/framework/docs/providers/aws/guide/v0_to_v1/) is possible, but not straightforward. You need to understand both versions and adjust the settings. Regarding having multiples versions of the same module, I believe that [it is not possible](https://github.com/npm/npm/issues/5499). – Zanon Jun 21 '17 at 16:19