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

Unable to run docker image #44

Open
Rob-Smith-HDT opened this issue May 27, 2023 · 4 comments
Open

Unable to run docker image #44

Rob-Smith-HDT opened this issue May 27, 2023 · 4 comments

Comments

@Rob-Smith-HDT
Copy link

HI, I have followed the instructions in the Readme to deploy the docker image, but when it starts the following errors occur.

Please advise.

:52
2023-05-27 14:39:52 > qewd-server@2.48.0 start /opt/qewd
2023-05-27 14:39:52 > NODE_PATH=/opt/qewd/mapped/modules node qewd.js
2023-05-27 14:39:52
2023-05-27 14:39:52 internal/modules/cjs/loader.js:883
2023-05-27 14:39:52 throw err;
2023-05-27 14:39:52 ^
2023-05-27 14:39:52
2023-05-27 14:39:52 Error: Cannot find module '/opt/qewd/mapped/startup'
2023-05-27 14:39:52 Require stack:
2023-05-27 14:39:52 - /opt/qewd/qewd.js
2023-05-27 14:39:52 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
2023-05-27 14:39:52 at Function.Module._load (internal/modules/cjs/loader.js:725:27)
2023-05-27 14:39:52 at Module.require (internal/modules/cjs/loader.js:952:19)
2023-05-27 14:39:52 at require (internal/modules/cjs/helpers.js:88:18)
2023-05-27 14:39:52 at Object. (/opt/qewd/qewd.js:103:13)
2023-05-27 14:39:52 at Module._compile (internal/modules/cjs/loader.js:1063:30)
2023-05-27 14:39:52 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
2023-05-27 14:39:52 at Module.load (internal/modules/cjs/loader.js:928:32)
2023-05-27 14:39:52 at Function.Module._load (internal/modules/cjs/loader.js:769:14)
2023-05-27 14:39:52 at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
2023-05-27 14:39:52 code: 'MODULE_NOT_FOUND',
2023-05-27 14:39:52 requireStack: [ '/opt/qewd/qewd.js' ]
2023-05-27 14:39:52 }
2023-05-27 14:39:52 npm ERR! code ELIFECYCLE
2023-05-27 14:39:52 npm ERR! errno 1
2023-05-27 14:39:52 npm ERR! qewd-server@2.48.0 start: NODE_PATH=/opt/qewd/mapped/modules node qewd.js
2023-05-27 14:39:52 npm ERR! Exit status 1
2023-05-27 14:39:52 npm ERR!
2023-05-27 14:39:52 npm ERR! Failed at the qewd-server@2.48.0 start script.
2023-05-27 14:39:52 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-05-27 14:39:52
2023-05-27 14:39:52 npm ERR! A complete log of this run can be found in:
2023-05-27 14:39:52 npm ERR! /root/.npm/_logs/2023-05-27T13_39_52_916Z-debug.log

@robtweed
Copy link
Owner

Which QEWD Docker container are you trying to use? The standard version for Linux or the Raspberry Pi version?

Rob

@robtweed
Copy link
Owner

Also can you confirm the directory you're trying to run it in on your server, and the command you're using to start/run the container?

My guess is that it may be your volume mapping (the -v directive) not specifying the correct source directory on your server, hence the container's /opt/qewd/mapped folder doesn't contain anything

@Rob-Smith-HDT
Copy link
Author

Linux

@robtweed
Copy link
Owner

Just tested it from scratch on a Linux machine here - I created a folder ~/qewd-test and created the config.json. routes.json and index.js as per the README, pulled the Docker container and started it with:

docker run -it --name qewdup --rm -p 3000:8080 -v ~/qewd-test:/opt/qewd/mapped rtweed/qewd-server

It started just fine and I was able to use the API with curl localhost:3000/api/helloworld

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

2 participants