From 2bc5ddab6c18a8071a3c925afef69a886f7dea87 Mon Sep 17 00:00:00 2001 From: ilumer Date: Fri, 27 May 2022 23:30:50 +0800 Subject: [PATCH] fix node version check --- build/npm/preinstall.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/npm/preinstall.js b/build/npm/preinstall.js index b217c7bc12d00..75c9877da4d02 100644 --- a/build/npm/preinstall.js +++ b/build/npm/preinstall.js @@ -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; }