Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on installing plugin #8

Open
hcimadomo-procsi opened this issue Feb 15, 2023 · 3 comments
Open

error on installing plugin #8

hcimadomo-procsi opened this issue Feb 15, 2023 · 3 comments

Comments

@hcimadomo-procsi
Copy link

Hello, when i want install the plugin, i have foolowing error. Can you help me ?
BR
trace error in server:
Error instantiating new plugin: { Error: Cannot find module 'promise'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/app/meshcentral/meshcentral-data/plugins/eventlog/db.js:9:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3) code: 'MODULE_NOT_FOUND' }
Error ocurred while running plugin hookeventlog:hook_agentCoreIsStable (TypeError: Cannot read property 'getConfigFor' of null)
Error ocurred while running plugin hookeventlog:hook_agentCoreIsStable (TypeError: Cannot read property 'getConfigFor' of null)
Error ocurred while running plugin hookeventlog:hook_agentCoreIsStable (TypeError: Cannot read property 'getConfigFor' of null)

@pierrecorsini
Copy link

Same here.

@pierrecorsini
Copy link

pierrecorsini commented Sep 18, 2023

Well, I solved the issue by installing with npm install the modules nedb and promise (from the main meshcentral directory).

Unfortunately I do not know how to push a fix (no idea how the npm plugin dependencies works).

EDIT
Reaching new errors when saving plugin specific settings.

Node.js v18.13.0
Error: Command failed: /usr/bin/node /home/debian/node_modules/meshcentral --launch 123654
/home/debian/node_modules/meshcentral/meshuser.js:4550
                    } catch (ex) { console.log('Error loading plugin handler (' + e + ')'); }
                                                                                  ^

ReferenceError: e is not defined
    at WebSocket.processWebSocketData (/home/debian/node_modules/meshcentral/meshuser.js:4550:83)
    at WebSocket.emit (node:events:513:28)
    at Receiver.receiverOnMessage (/home/debian/node_modules/ws/lib/websocket.js:720:20)
    at Receiver.emit (node:events:513:28)
    at Receiver.dataMessage (/home/debian/node_modules/ws/lib/receiver.js:414:14)
    at Receiver.getData (/home/debian/node_modules/ws/lib/receiver.js:346:17)
    at Receiver.startLoop (/home/debian/node_modules/ws/lib/receiver.js:133:22)
    at Receiver._write (/home/debian/node_modules/ws/lib/receiver.js:69:10)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)

Node.js v18.13.0

    at ChildProcess.exithandler (node:child_process:419:12)
    at ChildProcess.emit (node:events:525:35)
    at maybeClose (node:internal/child_process:1091:16)
    at ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: '/usr/bin/node /home/debian/node_modules/meshcentral --launch 123654'
}
ERROR: MeshCentral failed with critical error, check mesherrors.txt. Restarting in 5 seconds...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@pierrecorsini @hcimadomo-procsi and others