Check on startup for Node.js version 14 or later

This commit is contained in:
Jan Oberhauser 2021-05-03 16:15:02 -05:00
parent 043cf6730c
commit 3d2eaa3aaa

View file

@ -24,8 +24,8 @@ if (process.argv.length === 2) {
var nodeVersion = process.versions.node.split('.');
if (parseInt(nodeVersion[0], 10) < 12 || parseInt(nodeVersion[0], 10) === 12 && parseInt(nodeVersion[1], 10) < 9) {
console.log(`\nYour Node.js version (${process.versions.node}) is too old to run n8n.\nPlease update to version 12.9 or later!\n`);
if (parseInt(nodeVersion[0], 10) < 14) {
console.log(`\nYour Node.js version (${process.versions.node}) is too old to run n8n.\nPlease update to version 14 or later!\n`);
process.exit(0);
}