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.
ask. However, command-line messages might refer to
ask. For ACDL, always use
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:
- An Amazon developer account. If you don't already have one, go to https://developer.amazon.com/alexa/console/ask, and then create an account.
- An AWS account to host your skill on AWS Lambda. If you don't already have an AWS account, go to https://aws.amazon.com/account/, and then create an account.
You must install the following software:
- The latest version of Node.js.
- The Amazon Web Services Command-Line Interface (AWS CLI). For details, see Installing the AWS CLI.
- 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:
- Install the ASK CLI.
- Configure the ASK CLI.
- (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 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.
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
- To make sure that you have the latest version of VS Code, complete the following steps:
- Open VS Code, and then click Help.
- Click the update-related option, which might be Check for updates or Restart to update.
- 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.
- If you already have the extension installed, complete the following steps to update it to the latest version:
- Open VS Code, and then click File > Preferences > Extensions.
- Search for the Alexa Skills Kit (ASK) toolkit extension.
- 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.
ask-cli-xto deploy your skills. The current version of the VS Code toolkit doesn't support ACDL deployments.
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
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
- 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 firstname.lastname@example.org $ 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
When I try to install the ASK CLI, I get an error not listed previously.
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.