From 4d14589484994374560a3992569303d947515d19 Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Thu, 22 Feb 2018 20:16:55 +0100 Subject: [PATCH] Fixed Node version check --- app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 126b933..89fec08 100644 --- a/app.js +++ b/app.js @@ -296,8 +296,9 @@ app.use((err, req, res, next) => { }); // Nodejs version check -if(parseInt(process.version.split('.')[0].replace('v', '')) <= 7){ - console.log(colors.red('Please use Node.js version 7.x or above')); +const nodeVersionMajor = parseInt(process.version.split('.')[0].replace('v', '')); +if(nodeVersionMajor < 7){ + console.log(colors.red(`Please use Node.js version 7.x or above. Current version: ${nodeVersionMajor}`)); process.exit(2); }