'Serverless Function Exceeded 250 MB' Error on Vercel Django Deployment?
I have this issue (" A Serverless Function has exceeded the unzipped maximum size of 250 MB. : https://vercel.link/serverless-function-size") when i'm trying to deploy to Vercel, I tried to remove as much as possible of non-needed packages but nothing changed, this is my installed packages from vercel: Successfully installed Django-4.2.3 MarkupPy-1.14 MarkupSafe-2.1.3 Pillow-10.0.0 PyJWT-2.8.0 PyYAML-6.0.1 Pygments-2.15.1 Unidecode-1.3.6 Werkzeug-2.3.6 amqp-5.1.1 asgiref-3.7.2 asttokens-2.2.1 backcall-0.2.0 billiard-4.1.0 certifi-2023.5.7 cffi-1.15.1 chardet-3.0.4 charset-normalizer-3.2.0 click-8.1.6 click-didyoumean-0.3.0 click-plugins-1.1.1 click-repl-0.3.0 colorama-0.4.6 crispy-bootstrap5-0.7 cryptography-41.0.2 cssselect2-0.7.0 decorator-5.1.1 defusedxml-0.7.1 diff-match-patch-20230430 django-admin-honeypot-1.1.0 django-allauth-0.54.0 django-appconf-1.0.5 django-bulk-update-or-create-0.3.0 django-categories-1.9.2 django-ckeditor-6.6.1 django-components-0.35 django-compressor-4.4 django-constance-2.9.1 django-crispy-forms-2.0 django-debug-toolbar-4.1.0 django-decorator-include-3.0 django-etc-1.4.0 django-filer-3.0.4 django-filter-23.2 django-grip-3.4.0 django-hitcount-1.3.5 django-htmx-1.16.0 django-import-export-3.2.0 django-ipware-5.0.0 django-jazzmin-2.6.0 django-js-asset-2.1.0 django-maintenance-mode-0.18.0 django-modeltranslation-0.18.11 django-mptt-0.14.0 django-ninja-0.22.2 django-picklefield-3.1 django-polymorphic-3.1.0 django-qsstats-magic-1.1.0 django-robots-5.0 django-rosetta-0.9.9 django-select2-8.1.2 django-shortcuts-1.6 django-split-settings-1.2.0 django-sql-explorer-3.2.1 django-widget-tweaks-1.4.12 easy-thumbnails-2.8.5 et-xmlfile-1.1.0 executing-1.2.0 gripcontrol-4.2.0 gunicorn-21.2.0 h11-0.9.0 h2-3.2.0 hpack-3.0.0 hstspreload-2023.1.1 html2text-2020.1.16 httpcore-0.9.1 httpx-0.13.3 hyperframe-5.2.0 idna-2.10 install-1.3.5 ipython-8.12.2 jedi-0.18.2 kombu-5.3.1 ldif3-3.1.1 lxml-4.9.3 matplotlib-inline-0.1.6 oauthlib-3.2.2 odfpy-1.4.1 openpyxl-3.1.2 packaging-23.2 parso-0.8.3 pexpect-4.9.0 pickleshare-0.7.5 polib-1.2.0 prompt-toolkit-3.0.39 psycopg2-binary-2.9.9 ptyprocess-0.7.0 pubcontrol-3.5.0 pure-eval-0.2.2 pycparser-2.21 pydantic-1.10.11 python-card-me-0.9.3 python-dateutil-2.8.2 python-dotenv-1.0.1 python-fsutil-0.10.0 python3-openid-3.2.0 pytz-2023.3 rcssmin-1.1.1 reportlab-4.0.4 requests-2.31.0 requests-oauthlib-1.3.1 rfc3986-1.5.0 rjsmin-1.2.1 six-1.16.0 sniffio-1.3.0 sorl-thumbnail-12.9.0 sqlparse-0.4.4 stack-data-0.6.2 svglib-1.5.1 tablib-3.5.0 tinycss2-1.2.1 toposort-1.10 traitlets-5.9.0 typing_extensions-4.7.1 tzdata-2023.3 tzlocal-5.0.1 ua-parser-0.18.0 unicode-slugify-0.1.5 unicodecsv-0.14.1 urllib3-1.26.6 user-agents-2.2.0 vine-5.0.0 wcwidth-0.2.6 webencodings-0.5.1 whitenoise-6.6.0 xlrd-2.0.1 xlwt-1.3.0
I removed as much as possible of non-needed packages but nothing changed, i also tried to non run the collectstatics and removed some large size files on my project to test if that was causing the issue, i also measure the total size of the packages folders on my local and it was less than 100mb.