From 022789202eadcf50cd9648c18e29f4cc88d6f851 Mon Sep 17 00:00:00 2001 From: Jason Jean Date: Mon, 9 Jun 2025 14:39:06 -0400 Subject: [PATCH] chore(repo): fix publish workflow (#31510) ## Current Behavior The publish workflow was failing because the preinstall script was exiting with code 1 when detecting an older Node.js version, causing the entire publishing process to fail. ## Expected Behavior The preinstall script should warn about Node.js version requirements but not exit with an error code during publishing, allowing the workflow to continue. ## Related Issue(s) This fixes a critical issue preventing package publishing due to Node.js version check failures in CI environments. The fix changes: - `console.error()` to `console.warn()` for better log categorization - Removes `process.exit(1)` to prevent workflow termination - Adds the actual Node.js version to the warning message for better debugging This ensures the publish workflow can complete successfully while still providing visibility into Node.js version mismatches. --- scripts/preinstall.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/preinstall.js b/scripts/preinstall.js index bd4fe9fabf..10bb843daa 100644 --- a/scripts/preinstall.js +++ b/scripts/preinstall.js @@ -15,10 +15,9 @@ const semverLessThan = require('semver/functions/lt'); // Check node version if (semverLessThan(process.version, '20.19.0')) { - console.error( - 'Please make sure that your installed Node version is greater than v20.19.0' + console.warn( + `Please make sure that your installed Node version (${process.version}) is greater than v20.19.0` ); - process.exit(1); } // Check for pnpm version