Fix HTTP 500 MIDDLEWARE_INVOCATION_FAILED on Vercel production deployment caused by @swc/helpers module resolution failure when using Next.js 16.2.x App Router with proxy.ts middleware convention and Sentry installed Includes evidence for Vercel troubleshooting demand.
Source-backedLast updated May 17, 20262 sourcesNeeds local verification
Check the build output, project root, and deployment platform configuration before redeploying.
Updated
Verification status
Source-backed
Evidence
2 public source URLs
Before you change production
This page includes public source URLs in the imported troubleshooting record. Compare those references with your version and environment before applying changes.
Reproduce the smallest failing action and save non-secret logs before changing configuration.
Check versions for Vercel, related SDKs, package managers, CI runners, and hosting providers.
Change one setting or dependency at a time, then rerun the same failing command or request.
Avoid destructive commands, credential rotation, billing changes, or security relaxations without a rollback plan.
What this error means
MIDDLEWARE_INVOCATION_FAILED: Cannot find module '/var/task/node_modules/@swc/helpers/esm/_interop_require_default.js' — next@16.2.x + proxy.ts + @sentry/nextjs is a Vercel failure pattern reported for developers trying to fix http 500 middleware_invocation_failed on vercel production deployment caused by @swc/helpers module resolution failure when using next.js 16.2.x app router with proxy.ts middleware convention and sentry installed. Based on the imported evidence, treat this as a tool-specific troubleshooting page rather than a generic API error.
Why this happens
GitHub vercel/next.js issues #93852 (#93850) reported May 2026 with minimal repro. Local build succeeds but Vercel deploy fails with HTTP 500. Blocking production deployments for teams using Next.js 16.2.x + sentry. Not in covered-errors (only generic 'Vercel build failed' exists, this is a specific deployment/runtime error). Category: Deployment.
Common causes
GitHub vercel/next.js issues #93852 (#93850) reported May 2026 with minimal repro. Local build succeeds but Vercel deploy fails with HTTP 500. Blocking production deployments for teams using Next.js 16.2.x + sentry. Not in covered-errors (only generic 'Vercel build failed' exists, this is a specific deployment/runtime error). Category: Deployment.