Search code examples
visual-studio-codeaws-lambdaalexa-skills-kit

Getting the Error - ASL CLI is not functional - unknown option '-l'


I'm trying to use VC.Code on Windows to work on Alexa skills.

I've installed:

  • nodejs
  • List item
  • ASK CLI

Extension added to VSCode:

  • Alexa Skills Kit (ASK) Toolkit
  • AWS Toolkit

When I run ASK CLI from the cmd window it seems fine.

However, when I try use most commands from VSCode Command Pallete

e.g.

ASK: Create a skill from a template'

or

'ASK: Clone a skill'

I get an error, as it appears the first thing the the command issues is "ask init -l"

which results in:

error: unknown option '-l'

Sure enough typing ask init -l into the cmd window causes the same error.

  • Why are the ASk commands in VSCode using an incorrect parameter?
  • Is it incorrect?
  • How do I make the commands work?

Solution

  • It appears that currently the VSCode ASK extension only works with ASK CLI v1.x.

    ASK CLI v2 was released mid-April 2020 and included breaking changes making it incompatible with the VSCode ASK extension.

    If you wanted to use the VSCode ASK extension, you could install the last release of ASK CLI v1 by running:

    npm i ask-cli@^1.0.0