|
@ -8,14 +8,9 @@ module.exports.checkSudo = function () { |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
module.exports.checkNodeVersion = function () { |
|
|
module.exports.checkNodeVersion = function () { |
|
|
let currentApropriateVersion = 14; |
|
|
const currentApropriateVersion = 14, nodeVersion = process.versions.node.split('.'); |
|
|
let nodeVersion = process.versions.node.split('.'); |
|
|
|
|
|
|
|
|
|
|
|
if (Number(nodeVersion[0]) < currentApropriateVersion) { |
|
|
return +nodeVersion[0] > currentApropriateVersion ? true : false; |
|
|
throw new Error(`The Node version must be at least v${currentApropriateVersion} or above.`); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
module.exports.checkPlatform = function () { |
|
|
module.exports.checkPlatform = function () { |
|
|