When deploying Serverless Functions in Twilio, it's important to consider the size limitations of dependencies. The specific maximum supported size for node dependencies isn't explicitly detailed in the available resources, so this article will mention the maximum supported size and how you can check the size of your dependencies.
Maximum supported size of dependencies
The maximum supported size of dependencies when deploying your Serverless Functions is 250 MB.
How can you confirm if your deployment exceeds the supported size?
You can easily confirm the total size of your dependencies by running the following commands:
In Unix systems (Linux, MacOS):
- Install the dependencies by running
npm install
- Check the exact disk usage by running
du -sh node_modules
If the total size exceeds 250 MB, make sure to optimize the dependencies used so the total size is below the limit.