Set up the ASK CLI to Use the Alexa Conversations Description Language

To install and configure the Alexa Skills Kit Command-Line Interface (ASK CLI) to create Alexa Conversations skills with the Alexa Conversations Description Language (ACDL), complete the following steps. After you complete these steps, you can move on to Tutorial: Create an Alexa Conversations Skill with ACDL.

Prerequisites

Before you install and configure the ASK CLI, you must meet the following prerequisites.

Accounts and permissions
You must have the following accounts and permissions:

Installations
You must install the following software:

Uninstallations

  • If you already installed a public version of the ASK CLI, you must uninstall it. To uninstall the ASK CLI, from the command line, run the following command:
    npm uninstall -g ask-cli

Steps to install and configure the ASK CLI

Complete the following steps to install and configure the ASK CLI to create skills for Alexa Conversations:

  1. Install the ASK CLI.
  2. Configure the ASK CLI.
  3. (Optional) Install the ACDL syntax highlighter for VS Code.

Step 1: Install the ASK CLI

From the command line, install a beta version of the ASK CLI that supports Alexa Conversations by using npm.

npm install -g ask-cli-x

Step 2: Configure the ASK CLI

To link the ASK CLI with your Amazon developer account and your AWS account, from the command line, run the following command.

askx configure

During this process, the ASK CLI prompts you to sign in to your Amazon developer account, and to link your AWS account.

After you configure the ASK CLI, you're ready to do the Tutorial: Create an Alexa Conversations Skill with ACDL.

(Optional) Step 3: Install the ACDL syntax highlighter for VS Code

If you use Visual Studio (VS) Code, and you want to use the ACDL syntax highlighter, complete the following instructions. ACDL syntax highlighting is currently available only for VS Code.

To install the ACDL syntax highlighter for VS Code

  1. To make sure that you have the latest version of VS Code, complete the following steps:
    1. Open VS Code, and then click Help.
    2. Click the update-related option, which might be Check for updates or Restart to update.
  2. Install the ASK Toolkit VS Code extension (version 2.4.0).
    For details about the toolkit plugin, see Get Started with the Alexa Skills Toolkit for Visual Studio Code.
  3. If you already have the extension installed, complete the following steps to update it to the latest version:
    1. Open VS Code, and then click File > Preferences > Extensions.
    2. Search for the Alexa Skills Kit (ASK) toolkit extension.
    3. Click the gear icon, and then click Install another version > 2.4.0.

After you install the extension, you can test syntax highlighting by creating a new ACDL file. You can also open an ACDL file from a project, such as the one you create in Tutorial: Create an Alexa Conversations Skill with ACDL.

Troubleshooting the ASK CLI installation

Try the following resolutions for issues you might encounter when you install the ASK CLI.

Issue: When I try to install the ASK CLI, I get an ENOENT error

Symptoms
When I try to install the ASK CLI, I get the following error.

npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /Users/username/.nvm/versions/node/v14.3.0/lib/node_modules/.staging/ask-cli-e209bd51/node_modules/@babel/generator/node_modules/source-map
npm ERR! dest /Users/username/.nvm/versions/node/v14.3.0/lib/node_modules/.staging/source-map-4818842b
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/username/.nvm/versions/node/v14.3.0/lib/node_modules/.staging/ask-cli-e209bd51/node_modules/@babel/generator/node_modules/source-map' -> '/Users/username/.nvm/versions/node/v14.3.0/lib/node_modules/.staging/source-map-4818842b'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/username/.npm/_logs/2020-06-09T04_38_12_058Z-debug.log

Try this

  • To make sure that you have the latest npm package, run the following command.
    $ sudo npm i -g npm
    
  • To remove package-lock, run the following commands.
    $ rm package-lock.json
    $ npm i
    $ sudo npm i -g .
    
  • To switch to the last working version of npm, run the following commands.
    $ sudo npm i -g npm@5.8.0
    $ npm -v
    5.8.0
    $ rm package-lock.json
    $ npm i
    $ sudo npm i -g .
    

Issue: When I try to install the ASK CLI, I get an error not listed previously

Symptoms
When I try to install the ASK CLI, I get an error not listed previously.

Try this
To make sure you didn't miss anything in the installation, see the Quick Start: Alexa Skills Kit Command Line Interface (ASK CLI) to review the general instructions about how to install the ASK CLI, to make sure you didn't miss anything.