mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
Check Node.js version, better error message
This commit is contained in:
parent
2c7a701c84
commit
d1a99b0a22
1 changed files with 11 additions and 0 deletions
|
@ -1,4 +1,15 @@
|
||||||
console.log("Welcome to Uptime Kuma");
|
console.log("Welcome to Uptime Kuma");
|
||||||
|
|
||||||
|
// Check Node.js Version
|
||||||
|
const nodeVersion = parseInt(process.versions.node.split(".")[0]);
|
||||||
|
const requiredVersion = 14;
|
||||||
|
console.log(`Your Node.js version: ${nodeVersion}`);
|
||||||
|
|
||||||
|
if (nodeVersion < requiredVersion) {
|
||||||
|
console.error(`Error: Your Node.js version is not supported, please upgrade to Node.js >= ${requiredVersion}.`);
|
||||||
|
process.exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
const args = require("args-parser")(process.argv);
|
const args = require("args-parser")(process.argv);
|
||||||
const { sleep, debug, getRandomInt, genSecret } = require("../src/util");
|
const { sleep, debug, getRandomInt, genSecret } = require("../src/util");
|
||||||
const config = require("./config");
|
const config = require("./config");
|
||||||
|
|
Loading…
Reference in a new issue