How to Migrate Alexa-Hosted Skills from Node.js 8.10 to Node.js 10.x

Gaurav Varshney Dec 31, 2019
Share:
Productivity Node.js Alexa-Hosted Skills
Blog_Header_Post_Img

Editor’s Note: This blog covers migrating your Alexa-hosted skills from Node.js 8.10 to Node.js 10.x. For migrating self-hosted skills from Node.js 8.10 to Node.js 10.x, please see our "Node.js 8.10 End of Life" blog.

You might have received an email from AWS about the end of life (EOL) for Node.js 8.10 at the end of 2019 or seen a notification on the developer console informing you about your skill’s migration to Node.js 10.x. As Node.js 8.10 reaches EOL starting December 31, 2019, there will no longer be any support for bug fixes, security updates, or performance improvements by the Node.js community. After February 6, 2020, AWS will no longer allow updating Node.js 8.10 Lambda functions. This means that although your code will continue to run past this date, you will not be able to add new features or fix bugs.

As Alexa-hosted skills uses AWS to provision backend resources for your skills, you likely need to migrate your hosted skill if it was created before the end of 2019. All hosted skills created in 2020 already use Node.js 10.x. Migration upgrades to existing Alexa-hosted skills running on Node.js 8.10 will begin occurring in early January. Once your skills is ready to be migrated, you will see a notification banner in your skill’s “Code” tab on the Developer Console and upgrading to Node.js 10.x occurs automatically the next time you deploy your skill code.

If you choose not to migrate, your skill will continue to run on Node.js 8.10. However, once you see the notification banner you will not be able to make changes to your skill’s code without re-deploying and upgrading to Node.js 10.x.

Should I Change My Skill’s Code When Migrating to Node 10.x?

Most of the changes in Node.js 10.x are minor. With that said, you should take a look at the changes in this version of Node.js and make sure your code isn’t using any end of life APIs. You can see the full list of new deprecations and notable changes on the Node.js blog. Previously deprecated APIs reaching end of life are:

  • Internal getters/setters from net.server
  • Older experimental async_hooks APIs

Notable new additions for skill developers:

  • Type checking has been added. See util_types docs
  • Environment process variables (process.env) must now be strings
  • Continued additions of Error Codes so you do not have to check the error message string. See this Medium blog for more details

Any end of life APIs must be changed when you change your runtime. After you remove references to end of life APIs, save and re-deploy your code. Test your skill (now running on Node.js 10.x) to ensure it is working the same way as before. Once you've completed those steps, you'll be all set!

How to Upgrade if You Are Using the ASK CLI

If you’re using ASK CLI, you’ll need to take the following steps:

  1. As outlined above, you will receive a notification in the ASK Developer Console when your Alexa-hosted skill is ready for upgrade.
  2. Update your CLI. You will need the most up to date version for this approach to work. Run “npm install -g ask-cli”.
  3. In the CLI, run “ask deploy”.
  4. Test your skill. 

Need More Help?

If you encounter any unexpected problems in your upgrade, please submit a support ticket or attend weekly office hours. Happy upgrading!

Subscribe