mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add log warning if node module required version cannot be satisfied
This commit is contained in:
@@ -42,7 +42,7 @@ function registerType(nodeSet,type,constructor,opts) {
|
||||
if (typeof type !== "string") {
|
||||
// This is someone calling the api directly, rather than via the
|
||||
// RED object provided to a node. Log a warning
|
||||
log.warn("Deprecated call to RED.runtime.nodes.registerType - node-set name must be provided as first argument");
|
||||
log.warn("["+nodeSet+"] Deprecated call to RED.runtime.nodes.registerType - node-set name must be provided as first argument");
|
||||
opts = constructor;
|
||||
constructor = type;
|
||||
type = nodeSet;
|
||||
|
@@ -115,6 +115,7 @@ function loadNodeFiles(nodeFiles) {
|
||||
if (nodeFiles[module].redVersion &&
|
||||
!semver.satisfies(runtime.version().replace("-git",""), nodeFiles[module].redVersion)) {
|
||||
//TODO: log it
|
||||
runtime.log.warn("["+module+"] "+runtime.log._("server.node-version-mismatch",{version:nodeFiles[module].redVersion}));
|
||||
continue;
|
||||
}
|
||||
if (module == "node-red" || !registry.getModuleInfo(module)) {
|
||||
|
Reference in New Issue
Block a user