mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
More module install improvements, NodeJS minimum version is now 11 due to express-handlebar.
This commit is contained in:
parent
aadfbafc33
commit
b4e0dbcd80
5 changed files with 3098 additions and 3097 deletions
|
@ -1083,13 +1083,17 @@ function InstallModules(modules, func) {
|
|||
var missingModules = [];
|
||||
if (modules.length > 0) {
|
||||
for (var i in modules) {
|
||||
var moduleName = modules[i].split('@')[0];
|
||||
try {
|
||||
var xxmodule = require(modules[i]);
|
||||
var xxmodule = require(moduleName);
|
||||
} catch (e) {
|
||||
missingModules.push(modules[i]);
|
||||
}
|
||||
}
|
||||
if (missingModules.length > 0) { InstallModuleEx(modules, func); } else { func(); }
|
||||
if (missingModules.length > 0) {
|
||||
console.log('Missing modules: ' + missingModules.join(', ') + '.');
|
||||
InstallModuleEx(modules, func);
|
||||
} else { func(); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue