From 1db8e9b8acf0e689df7bec2e73d2c8e1dc82b1ad Mon Sep 17 00:00:00 2001 From: James Ide Date: Sat, 3 Oct 2015 11:45:08 -0700 Subject: [PATCH] Update the packager's version check message for Node 4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Users should use Node 4.0 instead of io.js. This isn't a hard requirement since io.js still works but it's simpler if everyone is on the latest version. Closes https://github.com/facebook/react-native/pull/2547 Reviewed By: @​svcscm Differential Revision: D2506388 Pulled By: @vjeux --- checkNodeVersion.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/checkNodeVersion.js b/checkNodeVersion.js index f1a07c03..388a0e2f 100644 --- a/checkNodeVersion.js +++ b/checkNodeVersion.js @@ -14,20 +14,20 @@ var semver = require('semver'); var formatBanner = require('./formatBanner'); function checkNodeVersion() { - if (!semver.satisfies(process.version, '>=2.0.0')) { - var engine = semver.lt(process.version, '1.0.0') ? 'Node' : 'io.js'; + if (!semver.satisfies(process.version, '>=4')) { + var engine = semver.satisfies(process.version, '<1 >=4') ? 'Node' : 'io.js'; var message = 'You are currently running ' + engine + ' ' + process.version + '.\n' + '\n' + - 'React Native is moving to io.js 2.x. There are several ways to upgrade' + - 'to io.js depending on your preference.\n' + + 'React Native runs on Node 4.0 or newer. There are several ways to ' + + 'upgrade Node.js depending on your preference.\n' + '\n' + - 'nvm: nvm install iojs && nvm alias default iojs\n' + - 'Homebrew: brew unlink node; brew install iojs && brew ln iojs --force\n' + - 'Installer: download the Mac .pkg from https://iojs.org/\n' + + 'nvm: nvm install node && nvm alias default node\n' + + 'Homebrew: brew unlink iojs; brew install node\n' + + 'Installer: download the Mac .pkg from https://nodejs.org/\n' + '\n' + - 'About io.js: https://iojs.org\n' + - 'Follow along at: https://github.com/facebook/react-native/issues/1737'; + 'About Node.js: https://nodejs.org\n' + + 'Follow along at: https://github.com/facebook/react-native/issues/2545'; console.log(formatBanner(message, { chalkFunction: chalk.green, marginLeft: 1,