Skip to content

Commit 0227892

Browse files
authored
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.
1 parent 51bddad commit 0227892

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scripts/preinstall.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ const semverLessThan = require('semver/functions/lt');
1515

1616
// Check node version
1717
if (semverLessThan(process.version, '20.19.0')) {
18-
console.error(
19-
'Please make sure that your installed Node version is greater than v20.19.0'
18+
console.warn(
19+
`Please make sure that your installed Node version (${process.version}) is greater than v20.19.0`
2020
);
21-
process.exit(1);
2221
}
2322

2423
// Check for pnpm version

0 commit comments

Comments
 (0)