Skip to content

Default variable value not being honored #6014

@billy-bacon

Description

@billy-bacon

This is a Bug Report

Description

  • What went wrong?
    Default variable value not being honored. Throws an error if I run sls deploy without a stage.

  • What did you expect should have happened?
    Running sls deploy without --stage option should have set stage to 'development'

  • What was the config you used?

provider:
  name: aws
  profile: default
  runtime: nodejs8.10
  stage: ${opt:stage, 'development'}
  • What stacktrace or error message from your provider did you see?

Trying to populate non string value into a string for variable ${opt:stage}. Please make sure the value of the property is a string.
Similar or dependent issues:

Additional Data

  • Serverless Framework Version you're using: 1.40.0
  • Operating System: OSX 10.14.4
  • Stack Trace:
  • Provider Error messages:
    bbacon@venus (feature/936140__f__create_expired_reserved_holds_lambda *+) ~/dev/clients/dillon/hoopla/hoopla-holds-processing: sls deploy

Serverless Warning --------------------------------------

A valid option to satisfy the declaration 'opt:stage' could not be found.

Serverless Warning --------------------------------------

A valid option to satisfy the declaration 'opt:stage' could not be found.

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

Trying to populate non string value into a string for variable ${opt:stage}. Please make sure the value of the property is a string.

Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com

Your Environment Information ---------------------------
OS: darwin
Node Version: 8.11.1
Serverless Version: 1.40.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions