Unsupported option --template-url?

Hi,

I’m trying to create a new service based on a template I created using the –template-url option as described here: https://serverless.com/framework/docs/providers/aws/cli-reference/create/

But the cli does not seem to support this option.

Serverless Error ---------------------------------------

This command requires the --template option / -t shortcut. Usage: Template for the service. Available templates: “aws-nodejs”, “aws-nodejs-typescript”, “aws-nodejs-ecma-script”, “aws-python”, “aws-python3”, “aws-groovy-gradle”, “aws-java-maven”, “aws-java-gradle”, “aws-kotlin-jvm-maven”, “aws-kotlin-nodejs-gradle”, “aws-scala-sbt”, “aws-csharp”, “aws-fsharp”, “azure-nodejs”, “google-nodejs”, “kubeless-python”, “kubeless-nodejs”, “openwhisk-nodejs”, “openwhisk-php”, “openwhisk-python”, “openwhisk-swift”, “spotinst-nodejs”, “spotinst-python”, “webtasks-nodejs”, “plugin” and “hello-world”

The help page does not list this option either…

Plugin: Create
create … Create new Serverless service
–template / -t (required) … Template for the service. Available templates: “aws-nodejs”, “aws-nodejs-typescript”, “aws-nodejs-ecma-script”, “aws-python”, “aws-python3”, “aws-groovy-gradle”, “aws-java-maven”, “aws-java-gradle”, “aws-kotlin-jvm-maven”, “aws-kotlin-nodejs-gradle”, “aws-scala-sbt”, “aws-csharp”, “aws-fsharp”, “azure-nodejs”, “google-nodejs”, “kubeless-python”, “kubeless-nodejs”, “openwhisk-nodejs”, “openwhisk-php”, “openwhisk-python”, “openwhisk-swift”, “spotinst-nodejs”, “spotinst-python”, “webtasks-nodejs”, “plugin” and “hello-world”
–path / -p … The path where the service should be created (e.g. --path my-service)
–name / -n … Name for the service. Overwrites the default name of the created service.

I really need to be able to create new services based my own template.
Is there anyway to accomplish this?

Thanks

Hi JS,

Please try update your Serverless’s version. Here it’s working with a new fresh installed 1.24.1 :
$ serverless create --template-url https://github.com/serverless/serverless/tree/master/lib/plugins/create/templates/aws-nodejs --path myService
Serverless: Generating boilerplate…
Serverless: Downloading and installing “aws-nodejs”…
Serverless: Successfully installed “myService”

Regards,
NB

1 Like

Thanks, that was indeed the problem.