Skip to content

fix: Consolidate type exports to resolve 'too many open files' error in serverless environments#1241

Merged
ramya18101 merged 2 commits intomasterfrom
fern-bot/2025-11-06T05-55Z
Nov 6, 2025
Merged

fix: Consolidate type exports to resolve 'too many open files' error in serverless environments#1241
ramya18101 merged 2 commits intomasterfrom
fern-bot/2025-11-06T05-55Z

Conversation

@fern-api
Copy link
Contributor

@fern-api fern-api bot commented Nov 6, 2025

Changes

This PR consolidates the Management API type exports by combining all individual type definition files into a single types.ts file. This significantly reduces the number of files that need to be opened during module resolution, resolving the 'EMFILE: too many open files' errors experienced in serverless environments like Vercel and AWS Lambda.

What changed:

  • Consolidated 1500+ individual type definition exports into a single src/management/api/types/types.ts file
  • Updated the barrel export in src/management/api/types/index.ts to re-export from the consolidated types file
  • Removed individual type definition files that were causing excessive file descriptor usage

Why this is important:
This fixes a critical issue where the SDK v5 would fail to deploy on serverless platforms (Vercel, AWS Lambda) due to exceeding the operating system's limit on open file descriptors. The previous implementation had each type definition in a separate file, which caused Node.js to open too many files simultaneously during module resolution.

References

Testing

  • This change is auto-generated by Fern from the API Definition
  • This change adds unit test coverage (not applicable for generated code consolidation)
  • This change adds integration test coverage (not applicable for generated code consolidation)

How to test:

  1. Deploy an application using auth0 v5 to Vercel or AWS Lambda
  2. Verify that the deployment succeeds without 'EMFILE: too many open files' errors
  3. Verify that all type imports continue to work correctly
  4. Run existing test suite to ensure no regressions

Checklist

@fern-api fern-api bot requested a review from a team as a code owner November 6, 2025 05:55
@developerkunal developerkunal changed the title 🌿 Fern Regeneration -- November 6, 2025 fix: Consolidate type exports to resolve 'too many open files' error in serverless environments Nov 6, 2025
@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.19%. Comparing base (b10fdde) to head (549e63d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1241      +/-   ##
==========================================
- Coverage   79.94%   78.19%   -1.75%     
==========================================
  Files         515      354     -161     
  Lines       19287    17742    -1545     
  Branches     9555     9413     -142     
==========================================
- Hits        15419    13874    -1545     
  Misses       3868     3868              
Flag Coverage Δ
alltests 78.19% <100.00%> (-1.75%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ramya18101 ramya18101 merged commit da3aa87 into master Nov 6, 2025
9 of 10 checks passed
@ramya18101 ramya18101 deleted the fern-bot/2025-11-06T05-55Z branch November 6, 2025 06:44
@developerkunal developerkunal mentioned this pull request Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v5: too many open files on vercel

3 participants