Check for correct Node.js version on start

This commit is contained in:
Jan Oberhauser 2019-10-23 14:03:40 +02:00
parent 69af5e7490
commit a2b589880f

View file

@ -37,6 +37,11 @@ if (!supportedCommands.includes(command)) {
process.argv.push('--help');
}
if (parseInt(process.versions.node.split('.')[0], 10) < 10) {
console.log('\nThe Node.js version is too old to run n8n. Please use version 10 or later!\n');
process.exit(0);
}
require('@oclif/command').run()
.then(require('@oclif/command/flush'))
.catch(require('@oclif/errors/handle'));