|
|
|
@ -3936,8 +3936,8 @@ var meshserver = null;
|
|
|
|
|
var childProcess = null;
|
|
|
|
|
var previouslyInstalledModules = {};
|
|
|
|
|
function mainStart() {
|
|
|
|
|
// Check the NodeJS is version 10 or better.
|
|
|
|
|
if (Number(process.version.match(/^v(\d+\.\d+)/)[1]) < 11) { console.log("MeshCentral requires Node v11 or above, current version is " + process.version + "."); return; }
|
|
|
|
|
// Check the NodeJS is version 16 or better.
|
|
|
|
|
if (Number(process.version.match(/^v(\d+\.\d+)/)[1]) < 16) { console.log("MeshCentral requires Node v16 or above, current version is " + process.version + "."); return; }
|
|
|
|
|
|
|
|
|
|
// If running within the node_modules folder, move working directory to the parent of the node_modules folder.
|
|
|
|
|
if (__dirname.endsWith('\\node_modules\\meshcentral') || __dirname.endsWith('/node_modules/meshcentral')) { process.chdir(require('path').join(__dirname, '..', '..')); }
|
|
|
|
|