From 24e5eb3c80435e1d3b971e9dcb0a63c969c1beb6 Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Tue, 3 Nov 2015 13:29:26 +0200 Subject: [PATCH] Verify node version and warn the user when it is not supported Update node versions in package.json Implements https://github.com/NativeScript/nativescript-cli/issues/594 --- lib/common | 2 +- lib/nativescript-cli.ts | 5 ++++- package.json | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/common b/lib/common index c1f80e79c2..0800da03af 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit c1f80e79c2b93dfdf6a938db1c1d71309c2dda2c +Subproject commit 0800da03afc56c93f7c25861f708c4417edbc380 diff --git a/lib/nativescript-cli.ts b/lib/nativescript-cli.ts index b0e6b8411d..bb7b46cd69 100644 --- a/lib/nativescript-cli.ts +++ b/lib/nativescript-cli.ts @@ -1,7 +1,10 @@ /// "use strict"; -require("./bootstrap"); +// this call must be first to avoid requiring c++ dependencies +require("./common/verify-node-version").verifyNodeVersion(require("../package.json").engines.node); + +require("./bootstrap"); import fiber = require("fibers"); import Future = require("fibers/future"); import {installUncaughtExceptionListener} from "./common/errors"; diff --git a/package.json b/package.json index d255a3719d..b7e4252ab0 100644 --- a/package.json +++ b/package.json @@ -98,6 +98,6 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=0.10.26 <0.10.34 || >=0.10.35" + "node": ">=0.10.40 <0.11.0 || >=0.12.7 <0.13.0 || >=4.2.1 <5.0.0" } }