From 445289a761d0aff5fca7e9112634f143e18a6133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20H=C3=A4usler?= Date: Sun, 3 Nov 2019 17:34:10 +0100 Subject: [PATCH] Require Node.js >=12 --- .electron-vue/preinstall.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.electron-vue/preinstall.js b/.electron-vue/preinstall.js index faf45141b..e4e4d113a 100644 --- a/.electron-vue/preinstall.js +++ b/.electron-vue/preinstall.js @@ -1,6 +1,12 @@ 'use strict' +const nodeMajor = Number(process.versions.node.match(/^(\d+)\./)[1]) +if (nodeMajor < 12) { + console.error('[ERROR] Node.js v12 or above is required.\n') + process.exit(1) +} + if (!/yarn\.js$/.test(process.env.npm_execpath)) { - console.error('Please use yarn to install dependencies.\n') + console.error('[ERROR] Please use yarn to install dependencies.\n') process.exit(1) }