Node.js 22 Released: Main Changes in the New Release

Online Python Trainer for Beginners

Learn Python easily without overwhelming theory. Solve practical tasks with automatic checking, get hints in Russian, and write code directly in your browser — no installation required.

Start Course

Node.js 22 Released: What Changed and How It Will Affect Development



On April 3, 2025, the official release of Node.js 22 took place. This event is already being called one of the most significant in recent years. The new version of the platform brings not only long-awaited performance improvements but also fundamental changes in syntax and module handling. Let's break down what's new in Node.js 22 and why you should update your projects.



Key Innovations in Node.js 22



The Node.js developers focused on three areas: execution speed, syntax simplification, and API stability. Here are the main changes:



  • V8 12.4 Engine — the new JavaScript engine provides up to 15% performance improvement in typical scenarios. Array operations are accelerated, and JIT compilation is improved.
  • Stable WebSocket — native WebSocket support is now marked as stable. This means third-party libraries like ws or socket.io are no longer needed for building real-time applications.
  • Improved require() for ESM — you can now synchronously load ES modules via require(). This is a huge step towards full CommonJS and ESM compatibility.
  • Import syntax without extensions — Node.js 22 now automatically resolves .js, .mjs, and .cjs extensions during import. You no longer need to write import './module.js', just import './module'.
  • Support for RegExp v-flags — the new v flag for regular expressions improves Unicode and character set handling.


Why This Matters for Developers



The first thing that stands out is speed. If your project runs under high load, upgrading to Node.js 22 can provide a noticeable performance boost without changing code. This is especially evident in server-side data processing and parsing.



The second is development simplification. Stable WebSocket allows you to write chats, games, and streaming services without unnecessary dependencies. And the improved require() lowers the entry barrier for beginners who are used to CommonJS but want to use modern modules.



Finally, automatic file extension detection is a small detail that saves hours of debugging. Especially when migrating old projects to ESM.



How to Upgrade to Node.js 22



The upgrade is standard. Run in the terminal:



npm install -g nn 22


Or download the installer from the official website nodejs.org. For correct operation, it is also recommended to update npm to version 10.8+.



What's Next: Node.js 23 and Plans



The Node.js developers have already announced that version 23 plans to completely drop support for legacy modules and transition to ESM by default. Node.js 22 is a transitional release that gives you the opportunity to prepare your code for future changes.



We recommend testing your projects on Node.js 22 now and replacing outdated calls with new APIs. This will save time in the future.



This article was prepared for the educational portal PythonLib. Stay tuned for updates in the world of JavaScript and Node.js with us.

Recommended Libraries