Node process fails to start with Error: Cannot find module ’express’

 Broswer based SSH Client not working and keep getting the below error when running webssh node application. 

root@gate# PORT=22222 node --tls-min-v1.0 /var/www/ezlogin/application/external/webssh/index.js

 

Error: Cannot find module 'express'

Require stack:
- /var/www/ezlogin/application/external/webssh/server/app.js
- /var/www/ezlogin/application/external/webssh/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
at Function.Module._load (internal/modules/cjs/loader.js:840:27)
at Module.require (internal/modules/cjs/loader.js:1019:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/var/www/ezlogin/application/external/webssh/server/app.js:11:15)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Module.require (internal/modules/cjs/loader.js:1019:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/var/www/ezlogin/application/external/webssh/server/app.js',
'/var/www/ezlogin/application/external/webssh/index.js'
]
 
 
 To install the module resolve the above error.

root@gate# cd /var/www/ezlogin/application/external/webssh/ && npm install --production --silent --no-audit

 

If you are getting the error "npm ERR! cb.apply is not a function", Refer article. Make sure npm version is >= 6. 

  
0 (0)
Article Rating (No Votes)
Rate this article
    Attached Files
    There are no attachments for this article.