SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

How do I manage the npm modules my Functions service uses?

Objective

This article shows you how to review the npm modules a Functions service depends on and how to import, change, or remove them, so your function code can use the libraries it needs.

 

Product

Twilio Functions and Assets

 

Environment

Twilio Console

 

Procedure

  1. In the Twilio Console, select Builder tools in the left sidebar.
  2. Select Functions & Assets, then Services.
  3. Select the name of the service you want to configure.
  4. Select the Dependencies tab. The table lists each Module with its Version.
  5. To add a module, select Import module, enter the npm package name in Module, optionally enter a Version, and select Add.
  6. To change a module, select Edit on its row, update the Module or Version, and confirm the update.
  7. To remove a module, select Delete on its row.

 

Additional Information

  • Leave Version empty to use the latest version. Otherwise enter a valid semver value such as 1.2.3, ^1.2, or ~1.2.
  • The module name must be a valid npm package name, and you cannot add the same module twice.
  • The core modules twilio and @twilio/runtime-handler are included with every service. They are marked Required in the table and cannot be edited or removed.
  • If the service has no build yet, the table shows that no build is available. If it has a build but no added modules, it shows that no dependencies have been added yet.

 

This content was generated by AI and reviewed, edited, and verified by a human.

Have more questions? Submit a request
Powered by Zendesk