require package version from correct folder

Signed-off-by: si458 <simonsmith5521@gmail.com>

si458 committed Oct 17, 2024 at 20:18 UTC cfe9345b53fcd660985d7ce7b82278182b40f41e
1 file changed +1 -1
meshcentral.js
+1 -1
@@ -4028,7 +4028,7 @@ function InstallModules(modules, args, func) {
4028 try {
4029 // Does the module need a specific version?
4030 if (moduleVersion) {
4031 - if (require(`${moduleName}/package.json`).version != moduleVersion) { throw new Error(); }
4031 + if (require(`./node_modules/${moduleName}/package.json`).version != moduleVersion) { throw new Error(); }
4032 } else {
4033 // For all other modules, do the check here.
4034 // Is the module in package.json? Install exact version.