diff --git a/bin/now.js b/bin/now.js index 551a954..edbdcd2 100755 --- a/bin/now.js +++ b/bin/now.js @@ -6,9 +6,16 @@ import {resolve} from 'path' // Packages import minimist from 'minimist' import {spawn} from 'cross-spawn' +import nodeVersion from 'node-version' // Ours import checkUpdate from '../lib/check-update' +import {error} from '../lib/error' + +if (nodeVersion.major < 6) { + error('Now requires at least version 6 of Node. Please upgrade!') + process.exit(1) +} const argv = minimist(process.argv.slice(2)) diff --git a/package.json b/package.json index 9241238..616390e 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "minimist": "1.2.0", "ms": "0.7.2", "node-fetch": "1.6.3", + "node-version": "1.0.0", "progress": "1.1.8", "resumer": "0.0.0", "semver-compare": "1.0.0",