From 15b99c574980357eb3414da6533a7f0cf0ef1295 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Tue, 6 Aug 2019 19:24:45 +0900 Subject: [PATCH] Use appropriate the version of Node.js --- packages/node_modules/@node-red/runtime/lib/index.js | 2 +- packages/node_modules/node-red/lib/red.js | 6 +++--- packages/node_modules/node-red/red.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/node_modules/@node-red/runtime/lib/index.js b/packages/node_modules/@node-red/runtime/lib/index.js index 58b7df986..66bff6ff2 100644 --- a/packages/node_modules/@node-red/runtime/lib/index.js +++ b/packages/node_modules/@node-red/runtime/lib/index.js @@ -129,7 +129,7 @@ function start() { log.info(log._("runtime.version",{component:"Node.js ",version:process.version})); if (settings.UNSUPPORTED_VERSION) { log.error("*****************************************************************"); - log.error("* "+log._("runtime.unsupported_version",{component:"Node.js",version:process.version,requires: ">=4"})+" *"); + log.error("* "+log._("runtime.unsupported_version",{component:"Node.js",version:process.version,requires: ">=8.9.0"})+" *"); log.error("*****************************************************************"); events.emit("runtime-event",{id:"runtime-unsupported-version",payload:{type:"error",text:"notification.errors.unsupportedVersion"},retain:true}); } diff --git a/packages/node_modules/node-red/lib/red.js b/packages/node_modules/node-red/lib/red.js index 2a04df578..4d7269518 100644 --- a/packages/node_modules/node-red/lib/red.js +++ b/packages/node_modules/node-red/lib/red.js @@ -27,9 +27,9 @@ var apiEnabled = false; function checkVersion(userSettings) { var semver = require('semver'); - if (!semver.satisfies(process.version,">=4.8.0")) { + if (!semver.satisfies(process.version,">=8.9.0")) { // TODO: in the future, make this a hard error. - // var e = new Error("Unsupported version of node.js"); + // var e = new Error("Unsupported version of Node.js"); // e.code = "unsupported_version"; // throw e; userSettings.UNSUPPORTED_VERSION = process.version; @@ -39,7 +39,7 @@ function checkVersion(userSettings) { * This module provides the full Node-RED application, with both the runtime * and editor components built in. * - * The API this module exposes allows it to be embedded within another node.js + * The API this module exposes allows it to be embedded within another Node.js * application. * * @namespace node-red diff --git a/packages/node_modules/node-red/red.js b/packages/node_modules/node-red/red.js index 337eb44e8..040f2db53 100755 --- a/packages/node_modules/node-red/red.js +++ b/packages/node_modules/node-red/red.js @@ -197,8 +197,8 @@ try { RED.init(server,settings); } catch(err) { if (err.code == "unsupported_version") { - console.log("Unsupported version of node.js:",process.version); - console.log("Node-RED requires node.js v4 or later"); + console.log("Unsupported version of Node.js:",process.version); + console.log("Node-RED requires Node.js v8.9.0 or later"); } else if (err.code == "not_built") { console.log("Node-RED has not been built. See README.md for details"); } else {