mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
slightly safer in case engines is missing
This commit is contained in:
parent
82b45362b1
commit
c1958d0bbe
2
packages/node_modules/node-red/red.js
vendored
2
packages/node_modules/node-red/red.js
vendored
@ -27,7 +27,7 @@ if (process.argv[2] === 'admin') {
|
||||
}
|
||||
|
||||
var node_ver = parseInt(process.version.split('.')[0].substring(1));
|
||||
var node_rqd = parseInt((require('./package.json').engines.node).match(/\d+/).join(''));
|
||||
var node_rqd = parseInt((require('./package.json').engines.node).match(/\d+/).join('')) || 0;
|
||||
if (node_ver < node_rqd) {
|
||||
console.log("This version of Node-RED requires Node.js version",node_rqd,"as a minimum.");
|
||||
console.log("Please upgrade your Node.js version and restart.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user