(npm/rome): remove `node:` prefix for builtin module
MODIFY
npm/rome/bin/rome
npm/rome/bin/rome
@@ -18,7 +18,7 @@ const PLATFORMS = {
const binPath = PLATFORMS?.[platform]?.[arch];
if (binPath) {
- const result = require("node:child_process").spawnSync(
+ const result = require("child_process").spawnSync(
require.resolve(binPath),
process.argv.slice(2),
{ shell: false, stdio: "inherit" },

MODIFY
npm/rome/scripts/postinstall.js
npm/rome/scripts/postinstall.js
@@ -28,7 +28,7 @@ if (binName) {
if (binPath) {
try {
- require("node:fs").chmodSync(binPath, 0o755);
+ require("fs").chmodSync(binPath, 0o755);
} catch (err) {
console.warn(
"The Rome CLI postinstall script failed to set execution permissions to the native binary. " + "Running Rome from the npm package will probably not work correctly.",

(npm/rome): remove `node:` prefix for builtin module (#2607)