Skip to content

Commit

Permalink
Merge pull request #150547 from ilumer/fix_preinstall
Browse files Browse the repository at this point in the history
fix build/npm/preinstall.js node version check
  • Loading branch information
hediet authored May 30, 2022
2 parents 6cdb771 + 2bc5dda commit 936115a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/npm/preinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const majorNodeVersion = parseInt(nodeVersion[1]);
const minorNodeVersion = parseInt(nodeVersion[2]);
const patchNodeVersion = parseInt(nodeVersion[3]);

if (majorNodeVersion < 14 || (majorNodeVersion === 14 && minorNodeVersion < 17) || (majorNodeVersion === 14 && minorNodeVersion === 17 && patchNodeVersion < 4) || majorNodeVersion >= 17) {
console.error('\033[1;31m*** Please use node.js versions >=14.17.4 and <17.\033[0;0m');
if (majorNodeVersion < 16 || (majorNodeVersion === 16 && minorNodeVersion < 14) || majorNodeVersion >= 17) {
console.error('\033[1;31m*** Please use node.js versions >=16.14.x and <17.\033[0;0m');
err = true;
}

Expand Down

0 comments on commit 936115a

Please sign in to comment.