MeshCentral: pkcs7-modified forge not found

when running the latest code from github (not via npm) it will not start because its missing a module even though the file is indeed located where it needs to be?

PS C:\Users\sas_2\Documents\Developer\meshcentral> node node_modules/meshcentral --cert mytestmachine.com
MeshCentral HTTP redirection server running on port 80.
Generating certificates, may take a few minutes...
Generating root certificate...
Generating HTTPS certificate...
Generating MeshAgent certificate...
Generating code signing certificate...
Generating Intel AMT MPS certificate...
MeshCentral v1.0.28, Hybrid (LAN + WAN) mode.
ERR: node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module './node_modules/node-forge/lib/forge'
Require stack:
- C:\Users\sas_2\Documents\Developer\meshcentral\node_modules\meshcentral\pkcs7-modified.js
- C:\Users\sas_2\Documents\Developer\meshcentral\node_modules\meshcentral\authenticode.js
- C:\Users\sas_2\Documents\Developer\meshcentral\node_modules\meshcentral\meshcentral.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\sas_2\Documents\Developer\meshcentral\node_modules\meshcentral\pkcs7-modified.js:19:13)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\sas_2\\Documents\\Developer\\meshcentral\\node_modules\\meshcentral\\pkcs7-modified.js',
    'C:\\Users\\sas_2\\Documents\\Developer\\meshcentral\\node_modules\\meshcentral\\authenticode.js',
    'C:\\Users\\sas_2\\Documents\\Developer\\meshcentral\\node_modules\\meshcentral\\meshcentral.js'
  ]
}

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

The new feature does not affect your script at all. If an agent is in the meshcentral-data/agents folder, it is taken first and no server signing is done. Hope that helps.

thanks it’s fully clear now. such a legend.

When it comes to AV, changing the agent’s resource strings to customize them to the server should make a big difference. That will hopefully be coming up soon.

@Ylianst yep that works a treat now, even code-signs differently with the name as mytestmachine.com-04dc08 for me

shame my norton keeps deleting the file still every time i download it even though it has a different code-sign certificate on (we have a paid code-sign certificate thankfully which works 99% of the time)