Upgrade to Node.js 26
Recipe ID
org.openrewrite.node.migrate.upgrade-node-26Artifact@openrewrite/recipes-nodejsMigrate deprecated APIs for Node.js 26 compatibility. Includes all migrations from Node.js 24, plus Node 25 and Node 26 deprecations.
Composite recipeProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.node.migrate.upgrade-node-26If the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-nodejsDefinition
This recipe runs the following recipes in order.
- Increase Node.js engine version
org.openrewrite.node.migrate.increase-node-engine-version - Increase Node.js version in GitHub Actions
org.openrewrite.node.migrate.increase-node-engine-version-in-github-actions - org.openrewrite.nodejs.migrate.UpgradeNodeVersion
org.openrewrite.nodejs.migrate.UpgradeNodeVersion - Upgrade to Node.js 24
org.openrewrite.node.migrate.upgrade-node-24 - Replace
ServerResponse.writeHeader()withwriteHead()org.openrewrite.node.migrate.http.replace-server-response-write-header - Replace deprecated
node:_stream_*withnode:streamorg.openrewrite.node.migrate.stream.replace-internal-modules - Find
crypto.createDecipheriv()for AEAD ciphers withoutauthTagLengthorg.openrewrite.node.migrate.crypto.find-aead-decipheriv-without-auth-tag-length - Find
Duplex.toWeb()calls passingoptions.typeorg.openrewrite.node.migrate.stream.find-duplex-to-web-type - Find
module.register()usageorg.openrewrite.node.migrate.find-module-register