Check Node.js version (#3245)

* Check Node.js version

* Fix bug
This commit is contained in:
Aya Morisawa 2018-11-15 22:17:06 +09:00 committed by syuilo
parent d9828fdc6a
commit 766cae2299

View File

@ -112,7 +112,12 @@ async function init(): Promise<Config> {
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();