← All recipes
Moderne licensed

Replace deprecated fs.F_OK, fs.R_OK, fs.W_OK, fs.X_OK with fs.constants.*

Recipe IDorg.openrewrite.node.migrate.fs.replace-fs-access-constantsArtifact@openrewrite/recipes-nodejs

Replace deprecated file access constants (fs.F_OK, fs.R_OK, fs.W_OK, fs.X_OK) with their equivalents from fs.constants. These constants were removed in Node.js v24+ and should be accessed through the constants namespace.

Single recipeDEP0176Proprietary

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.fs.replace-fs-access-constants

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-nodejs