mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #2256 from kazuhitoyokoi/master-fixerrorhandlingtostartserver
Use appropriate version of Node.js
This commit is contained in:
commit
87359937c9
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@ -28,7 +28,7 @@ To help us understand the issue, please fill-in as much of the following informa
|
|||||||
### Please tell us about your environment:
|
### Please tell us about your environment:
|
||||||
|
|
||||||
- [ ] Node-RED version:
|
- [ ] Node-RED version:
|
||||||
- [ ] node.js version:
|
- [ ] Node.js version:
|
||||||
- [ ] npm version:
|
- [ ] npm version:
|
||||||
- [ ] Platform/OS:
|
- [ ] Platform/OS:
|
||||||
- [ ] Browser:
|
- [ ] Browser:
|
||||||
|
2
.github/ISSUE_TEMPLATE/--bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/--bug_report.md
vendored
@ -33,7 +33,7 @@ To help us understand the issue, please fill-in as much of the following informa
|
|||||||
### Please tell us about your environment:
|
### Please tell us about your environment:
|
||||||
|
|
||||||
- [ ] Node-RED version:
|
- [ ] Node-RED version:
|
||||||
- [ ] node.js version:
|
- [ ] Node.js version:
|
||||||
- [ ] npm version:
|
- [ ] npm version:
|
||||||
- [ ] Platform/OS:
|
- [ ] Platform/OS:
|
||||||
- [ ] Browser:
|
- [ ] Browser:
|
||||||
|
@ -26,7 +26,7 @@ relevant nodes, press Ctrl-E and copy the flow data from the Export dialog.
|
|||||||
At a minimum, please include:
|
At a minimum, please include:
|
||||||
|
|
||||||
- Version of Node-RED - either release number if you downloaded a zip, or the first few lines of `git log` if you are cloning the repository directly.
|
- Version of Node-RED - either release number if you downloaded a zip, or the first few lines of `git log` if you are cloning the repository directly.
|
||||||
- Version of node.js - what does `node -v` say?
|
- Version of Node.js - what does `node -v` say?
|
||||||
|
|
||||||
## Feature requests
|
## Feature requests
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ function start() {
|
|||||||
log.info(log._("runtime.version",{component:"Node.js ",version:process.version}));
|
log.info(log._("runtime.version",{component:"Node.js ",version:process.version}));
|
||||||
if (settings.UNSUPPORTED_VERSION) {
|
if (settings.UNSUPPORTED_VERSION) {
|
||||||
log.error("*****************************************************************");
|
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("*****************************************************************");
|
log.error("*****************************************************************");
|
||||||
events.emit("runtime-event",{id:"runtime-unsupported-version",payload:{type:"error",text:"notification.errors.unsupportedVersion"},retain:true});
|
events.emit("runtime-event",{id:"runtime-unsupported-version",payload:{type:"error",text:"notification.errors.unsupportedVersion"},retain:true});
|
||||||
}
|
}
|
||||||
|
6
packages/node_modules/node-red/lib/red.js
vendored
6
packages/node_modules/node-red/lib/red.js
vendored
@ -27,9 +27,9 @@ var apiEnabled = false;
|
|||||||
|
|
||||||
function checkVersion(userSettings) {
|
function checkVersion(userSettings) {
|
||||||
var semver = require('semver');
|
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.
|
// 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";
|
// e.code = "unsupported_version";
|
||||||
// throw e;
|
// throw e;
|
||||||
userSettings.UNSUPPORTED_VERSION = process.version;
|
userSettings.UNSUPPORTED_VERSION = process.version;
|
||||||
@ -39,7 +39,7 @@ function checkVersion(userSettings) {
|
|||||||
* This module provides the full Node-RED application, with both the runtime
|
* This module provides the full Node-RED application, with both the runtime
|
||||||
* and editor components built in.
|
* 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.
|
* application.
|
||||||
*
|
*
|
||||||
* @namespace node-red
|
* @namespace node-red
|
||||||
|
6
packages/node_modules/node-red/red.js
vendored
6
packages/node_modules/node-red/red.js
vendored
@ -197,10 +197,8 @@ try {
|
|||||||
RED.init(server,settings);
|
RED.init(server,settings);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
if (err.code == "unsupported_version") {
|
if (err.code == "unsupported_version") {
|
||||||
console.log("Unsupported version of node.js:",process.version);
|
console.log("Unsupported version of Node.js:",process.version);
|
||||||
console.log("Node-RED requires node.js v4 or later");
|
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 {
|
} else {
|
||||||
console.log("Failed to start server:");
|
console.log("Failed to start server:");
|
||||||
if (err.stack) {
|
if (err.stack) {
|
||||||
|
Loading…
Reference in New Issue
Block a user