From 66f12616210bf8e0745304a23e0a8aedf647faf7 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 12 Jan 2018 15:36:10 -0500 Subject: [PATCH] add error message for unsupported versions of node --- bin/embark | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/embark b/bin/embark index c9173a48c..6e015edb0 100755 --- a/bin/embark +++ b/bin/embark @@ -1,4 +1,14 @@ #!/usr/bin/env node + +try { + eval('let __nodeTest = 123;'); +} catch(e) { + if (e.name === 'SyntaxError') { + console.error("unsupported version of NodeJS. Make sure you are running nodejs 6.9.5 or above"); + process.exit(); + } +} + var Cmd = require('../lib/cmd'); var cli = new Cmd(); cli.process(process.argv);