MongoDB_Admin icon indicating copy to clipboard operation
MongoDB_Admin copied to clipboard

Docker container failing

Open Gonzalo933 opened this issue 5 years ago • 3 comments

Hello, I am trying to run this app via Docker and I can build it fine with docker-compose build but when I try to start it with docker-compose up I get the following error:

mongo_admin_app |
mongo_admin_app | > [email protected] start /usr/src/app
mongo_admin_app | > node app.js
mongo_admin_app |
mongo_admin_app | internal/modules/cjs/loader.js:638
mongo_admin_app |     throw err;
mongo_admin_app |     ^
mongo_admin_app |
mongo_admin_app | Error: Cannot find module 'express'
mongo_admin_app |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
mongo_admin_app |     at Function.Module._load (internal/modules/cjs/loader.js:562:25)
mongo_admin_app |     at Module.require (internal/modules/cjs/loader.js:692:17)
mongo_admin_app |     at require (internal/modules/cjs/helpers.js:25:18)
mongo_admin_app |     at Object.<anonymous> (/usr/src/app/app.js:5:15)
mongo_admin_app |     at Module._compile (internal/modules/cjs/loader.js:778:30)
mongo_admin_app |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
mongo_admin_app |     at Module.load (internal/modules/cjs/loader.js:653:32)
mongo_admin_app |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
mongo_admin_app |     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
mongo_admin_app | npm ERR! code ELIFECYCLE
mongo_admin_app | npm ERR! errno 1
mongo_admin_app | npm ERR! [email protected] start: `node app.js`
mongo_admin_app | npm ERR! Exit status 1
mongo_admin_app | npm ERR!
mongo_admin_app | npm ERR! Failed at the [email protected] start script.
mongo_admin_app | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
mongo_admin_app | npm WARN Local package.json exists, but node_modules missing, did you mean to install?
mongo_admin_app |
mongo_admin_app | npm ERR! A complete log of this run can be found in:
mongo_admin_app | npm ERR!     /root/.npm/_logs/2019-10-23T07_55_08_282Z-debug.log
mongo_admin_app exited with code 1

My guess is that the package "express" is missing in the npm requirements

Gonzalo933 avatar Oct 23 '19 07:10 Gonzalo933

The dependencies are fine, I cannot find the cause of the error

Gonzalo933 avatar Oct 23 '19 08:10 Gonzalo933

What's your docker platform?

hatamiarash7 avatar Oct 23 '19 08:10 hatamiarash7

I have the feeling this kind of error and similar ones are currently going around due to node LTS upgrade. I would recommend to experiment with different node versions for this build.

bluebrown avatar Dec 08 '19 07:12 bluebrown