diff --git a/global-cli/index.js b/global-cli/index.js index ea5f3c1dd95..22bfddc1fca 100644 --- a/global-cli/index.js +++ b/global-cli/index.js @@ -112,6 +112,8 @@ function run(root, appName, version, verbose) { return; } + checkNodeVersion(); + var scriptsPath = path.resolve( process.cwd(), 'node_modules', @@ -157,5 +159,6 @@ function checkNodeVersion() { process.version, packageJson.engines.node ); + process.exit(1); } } diff --git a/package.json b/package.json index aed0d9fb586..0bf487482aa 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,9 @@ "description": "Configuration and scripts for Create React App.", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", + "engines": { + "node": ">=4" + }, "bugs": { "url": "https://github.com/facebookincubator/create-react-app/issues" },