From 766cae2299ad0ac47b10f2ee2a382c8e95194d90 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Thu, 15 Nov 2018 22:17:06 +0900 Subject: [PATCH] Check Node.js version (#3245) * Check Node.js version * Fix bug --- src/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 70b61a59f..91d998f19 100644 --- a/src/index.ts +++ b/src/index.ts @@ -112,7 +112,12 @@ async function init(): Promise { Logger.info('Welcome to Misskey!'); Logger.info(`<<< Misskey v${pkg.version} >>>`); - new Logger('Deps').info(`Node.js ${process.version}`); + new Logger('Nodejs').info(`Version ${process.version}`); + if (lessThan(process.version.slice(1).split('.').map(x => parseInt(x, 10)), [10, 0, 0])) { + new Logger('Nodejs').error(`Node.js version is less than 10.0.0. Please upgrade it.`); + process.exit(1); + } + await MachineInfo.show(); EnvironmentInfo.show();