Replace ServerResponse.writeHeader() with writeHead()
Recipe ID
org.openrewrite.node.migrate.http.replace-server-response-write-headerArtifact@openrewrite/recipes-nodejsServerResponse.prototype.writeHeader() was an undocumented alias for writeHead() that was deprecated in Node.js 11 (DEP0063) and removed in Node.js 26. The signatures are identical.
Single recipeDEP0063Proprietary
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.http.replace-server-response-write-headerIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-nodejs