Skip to content

Trying to populate non string value into a string for variable #3714

@elioncho

Description

@elioncho

This is a (Bug Report)

Description

  • What went wrong?
    I updated to the latest version of Serverless and I'm now getting an error when I invoke functions locally without adding the stage option in the command line.
  • What did you expect should have happened?
    The function should have been executed without an issue using the default stage as it was set up in the serverless.yml
provider:
  name: aws
  stage: dev
  custom:
    stage: ${opt:stage, self:provider.stage}
  • What was the config you used?
     OS:                 darwin
     Node Version:       6.10.3
     Serverless Version: 1.14.0
  • What stacktrace or error message from your provider did you see?
 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.
 
  Stack Trace --------------------------------------------
 
ServerlessError: Trying to populate non string value into a string for variable ${opt:stage}. Please make sure the value of the property is a string.
    at Variables.populateVariable (/usr/local/lib/node_modules/serverless/lib/classes/Variables.js:143:17)
    at singleValueToPopulate.then.valueToPopulate (/usr/local/lib/node_modules/serverless/lib/classes/Variables.js:109:23)
    at process._tickDomainCallback (internal/process/next_tick.js:135:7)

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