Skip to content

stuck when AllowedValues for Type number is present #172

@jjanczyszyn

Description

@jjanczyszyn

Tried deploying a stack after adding an additional parameter with type: Number and AllowedValues provided:

e.g.

    LuckyNumber: {
      Type: 'Nuber',
      AllowedValues: [0,1,2,3,4,5,6,7,8,9,10]
    }

the stack update gets stuck before asking for LuckyNumber - it hangs until I stop the process and then it shows TypeError: Cannot use 'in' operator to search for 'value' in 0

I was able to reproduce this with two different repos.
After removing AllowedValues I was able to deploy without problems.

full stacktrace
TypeError: Cannot use 'in' operator to search for 'value' in 0
    at new Choice (/Users/justynajanczyszyn/REPOS/mapbox/mbxcli/node_modules/@mapbox/cfn-config/node_modules/inquirer/lib/objects/choice.js:26:24)
    at Choices.choices.choices.map.val (/Users/justynajanczyszyn/REPOS/mapbox/mbxcli/node_modules/@mapbox/cfn-config/node_modules/inquirer/lib/objects/choices.js:23:14)
    at Array.map (<anonymous>)
    at new Choices (/Users/justynajanczyszyn/REPOS/mapbox/mbxcli/node_modules/@mapbox/cfn-config/node_modules/inquirer/lib/objects/choices.js:16:28)
    at new Prompt (/Users/justynajanczyszyn/REPOS/mapbox/mbxcli/node_modules/@mapbox/cfn-config/node_modules/inquirer/lib/prompts/base.js:43:26)
    at new ListPrompt (/Users/justynajanczyszyn/REPOS/mapbox/mbxcli/node_modules/@mapbox/cfn-config/node_modules/inquirer/lib/prompts/list.js:18:5)
    at PromptUI.fetchAnswer (/Users/justynajanczyszyn/REPOS/mapbox/mbxcli/node_modules/@mapbox/cfn-config/node_modules/inquirer/lib/ui/prompt.js:85:25)
    at MergeMapSubscriber._tryNext (/Users/justynajanczyszyn/REPOS/mapbox/mbxcli/node_modules/rxjs/internal/operators/mergeMap.js:69:27)
    at MergeMapSubscriber._next (/Users/justynajanczyszyn/REPOS/mapbox/mbxcli/node_modules/rxjs/internal/operators/mergeMap.js:59:18)
    at MergeMapSubscriber.Subscriber.next (/Users/justynajanczyszyn/REPOS/mapbox/mbxcli/node_modules/rxjs/internal/Subscriber.js:67:18)

@mapbox/platform

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions