Set up the ASK CLI to Use the Alexa Conversations Description Language (ACDL)
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.
Before you install and configure the ASK CLI, you must meet the following prerequisites:
Accounts and permissions
- You must have an Amazon developer account. If you don't already have one, go to https://developer.amazon.com/alexa/console/ask and create an account.
- You must have an AWS account, so that you can host your skill on AWS Lambda. If you don't already have an AWS account, go to https://aws.amazon.com/account/ and create an account.
- You must install the latest version of Node.js.
- You must install Git.
- You must install Java.
- You must install and configure 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, use 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
Install a beta version of the ASK CLI that supports Alexa Conversations by using
npm as follows.
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, run the following command.
During this process, you are prompted to sign in to your Amazon developer account, and to link your AWS account.
After you configure the ASK CLI, you are 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, use the following instructions. ACDL syntax highlighting is currently available only for VS Code.
To install the ACDL syntax highlighter for VS Code
- Make sure that your version of Visual Studio Code is up to date.
- 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, update it to the latest version by using the following steps:
- Open VS Code, and then go to 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.
The following are possible resolutions for issues when installing 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
- Make sure that you have the latest npm package as follows.
$ sudo npm i -g npm
$ rm package-lock.json $ npm i $ sudo npm i -g .
- Switch to the last working version of npm as follows.
$ sudo npm i -g email@example.com $ 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.
See the Quick Start: Alexa Skills Kit Command Line Interface (ASK CLI) to review the general instructions on how to install the ASK CLI, to make sure you didn't miss anything.