Some interesting background on why Next.js's middleware doesn't support Node.js on GH here: <a href="https://github.com/vercel/next.js/discussions/46722">https://github.com/vercel/next.js/discussions/46722</a><p>This feels like somewhere where you can really see the conflict between "Next.js is a general-purpose JS framework" and "Next.js is a framework for deploying on Vercel" come to life.<p>For Vercel, running on a specialized limited Edge runtime makes perfect sense. For non-Vercel deployments however that run directly with Node, it's an entirely artificial constraint.