fix node version check

This commit is contained in:
ilumer 2022-05-27 23:30:50 +08:00
parent 5c77ef5850
commit 2bc5ddab6c

View file

@ -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;
}