Fixed Node version check
parent
ddaf235d92
commit
4d14589484
5
app.js
5
app.js
|
@ -296,8 +296,9 @@ app.use((err, req, res, next) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Nodejs version check
|
// Nodejs version check
|
||||||
if(parseInt(process.version.split('.')[0].replace('v', '')) <= 7){
|
const nodeVersionMajor = parseInt(process.version.split('.')[0].replace('v', ''));
|
||||||
console.log(colors.red('Please use Node.js version 7.x or above'));
|
if(nodeVersionMajor < 7){
|
||||||
|
console.log(colors.red(`Please use Node.js version 7.x or above. Current version: ${nodeVersionMajor}`));
|
||||||
process.exit(2);
|
process.exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue