Added --no-package-lock argument when running npm install to install missing modules. This should remove unwanted module pruning. (#4318)
Ylian Saint-Hilaire committed
Jul 28, 2022 at 15:27 UTC
4f8950128549e12e810f0c697ca98f91a2386d88
1 file changed
+1
-1
meshcentral.js
+1
-1
@@ -3593,7 +3593,7 @@ function InstallModule(modulename, func, tag1, tag2) {
3593
// Get the working directory
3594
if ((__dirname.endsWith('/node_modules/meshcentral')) || (__dirname.endsWith('\\node_modules\\meshcentral')) || (__dirname.endsWith('/node_modules/meshcentral/')) || (__dirname.endsWith('\\node_modules\\meshcentral\\'))) { parentpath = require('path').join(__dirname, '../..'); }
3595
3596
- child_process.exec(npmpath + ` install --no-optional ${modulename}`, { maxBuffer: 512000, timeout: 120000, cwd: parentpath }, function (error, stdout, stderr) {
3596
+ child_process.exec(npmpath + ` install --no-package-lock --no-optional ${modulename}`, { maxBuffer: 512000, timeout: 120000, cwd: parentpath }, function (error, stdout, stderr) {
3597
if ((error != null) && (error != '')) {
3598
var mcpath = __dirname;
3599
if (mcpath.endsWith('\\node_modules\\meshcentral') || mcpath.endsWith('/node_modules/meshcentral')) { mcpath = require('path').join(mcpath, '..', '..'); }