languages
March 27, 2026 · 2 min read · 0 views

Node.js 22 Goes LTS: What's New for Production Apps

Node.js 22 is now in LTS, bringing native support for TypeScript, improved async stack traces, and enhanced security defaults. Here's what matters for your production deployments.

Node.js 22 Enters Long-Term Support

Node.js 22.0.0 was released in April 2024 and has now transitioned to Long-Term Support (LTS), making it a stable choice for production workloads. This release includes several features that streamline development and improve runtime reliability—most notably, native TypeScript support without transpilation.

Native TypeScript Execution

The biggest win in Node.js 22 is the ability to run TypeScript files directly using the --experimental-require-module flag (moving toward stable in future releases):

node --experimental-require-module app.ts

This eliminates the build step for simple scripts and development workflows, though you’ll still want a proper transpiler (like tsc or esbuild) for production bundles. TypeScript type-checking still requires a separate tool like tsc --noEmit.

Improved Async Stack Traces

Debugging Promise chains and async/await errors is now far more intuitive. Node.js 22 provides full stack traces across async boundaries, making it easier to trace the root cause of errors in complex async operations:

async function fetchUser(id) {
  const response = await fetch(`/api/users/${id}`);
  return response.json();
}

async function main() {
  const user = await fetchUser(123);
  console.log(user);
}

main().catch(err => {
  // Stack trace now includes the full async chain
  console.error(err.stack);
});

Enhanced Security Defaults

Node.js 22 tightens security posture by improving permission model support and deprecating unsafe modules. If you’re using --experimental-permission, it now has more granular controls for file system, network, and environment variable access.

Breaking Changes to Watch

  • The --no-deprecation flag no longer hides deprecation warnings (use proper filtering instead)
  • Several legacy callback-based APIs have moved closer to removal
  • ESM modules now have stricter semantics around default exports

If you’re upgrading from Node.js 20 LTS, review the official migration guide for your specific dependencies.

Performance Improvements

Node.js 22 includes optimizations to the V8 JavaScript engine and improved garbage collection tuning. For high-throughput applications, this can translate to 3–8% throughput gains with no code changes.

Configuration and Debugging

If you’re setting up Node.js 22 in a CI/CD pipeline, consider using environment variables for security-sensitive settings and leverage the improved async stack traces in error logging. Tools like API Request Builder can help test endpoints during your migration, while JSON Formatter is invaluable for validating API responses and configuration files during deployment.

Why It Matters

Node.js 22 LTS provides a stable foundation for production apps through 2027. Native TypeScript support reduces toolchain complexity, better async debugging saves hours of troubleshooting, and security enhancements protect against emerging threats. If you’re still on Node.js 18 or 20, now is the time to test 22 in a staging environment and plan your migration.

What to Do Next

  1. Test Node.js 22 locally with your application
  2. Review breaking changes in your dependencies (especially native modules)
  3. Benchmark performance gains using your real workloads
  4. Plan a staged rollout to production over the next 2–3 months
  5. Update CI/CD pipelines to use Node.js 22 for new projects

Related Kloubot Tools

This post was generated with AI assistance and reviewed for accuracy.