Christmas-Community
Christmas-Community copied to clipboard
Crashing with module not found
I'm running through docker and I am repeatedly getting this:
2023-12-21T21:08:42.387418092Z
2023-12-21T21:08:42.387479201Z > [email protected] start
2023-12-21T21:08:42.387492680Z > node src/manager.js
2023-12-21T21:08:42.387500132Z
2023-12-21T21:08:42.476790897Z node:internal/modules/cjs/loader:1147
2023-12-21T21:08:42.476835368Z throw err;
2023-12-21T21:08:42.476843296Z ^
2023-12-21T21:08:42.476849936Z
2023-12-21T21:08:42.476856539Z Error: Cannot find module 'child-process-promise'
2023-12-21T21:08:42.476863317Z Require stack:
2023-12-21T21:08:42.476869749Z - /usr/src/app/src/manager.js
2023-12-21T21:08:42.476876520Z at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
2023-12-21T21:08:42.476884563Z at Module._load (node:internal/modules/cjs/loader:985:27)
2023-12-21T21:08:42.476891243Z at Module.require (node:internal/modules/cjs/loader:1235:19)
2023-12-21T21:08:42.476897667Z at require (node:internal/modules/helpers:176:18)
2023-12-21T21:08:42.476904557Z at Object.<anonymous> (/usr/src/app/src/manager.js:1:18)
2023-12-21T21:08:42.476927594Z at Module._compile (node:internal/modules/cjs/loader:1376:14)
2023-12-21T21:08:42.476933844Z at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
2023-12-21T21:08:42.476940013Z at Module.load (node:internal/modules/cjs/loader:1207:32)
Is this on x64 or arm?
Here's what I see trying to run :1.35.0
x64
On Thu, Dec 21, 2023 at 10:34 PM Wingy @.***> wrote:
Is this on x64 or arm?
— Reply to this email directly, view it on GitHub https://github.com/Wingysam/Christmas-Community/issues/126#issuecomment-1866960343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHTWHIR7JM2CDRVFCBWVQLYKSTOPAVCNFSM6AAAAABA66UVFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRWHE3DAMZUGM . You are receiving this because you authored the thread.Message ID: @.***>
I'm also on x64. This is the exact issue Docker is meant to prevent. What do you see if you try docker image ls wingysam/christmas-community
? Here's what I see:
root@docker:~# docker image ls wingysam/christmas-community
REPOSITORY TAG IMAGE ID CREATED SIZE
wingysam/christmas-community latest ef9f227bbc88 5 days ago 254MB
wingysam/christmas-community <none> cf35dbb1c01f 10 months ago 244MB
Try this:
docker images --format '{{.Repository}}:{{.Tag}}' | grep 'wingysam/christmas-community:' | xargs docker rmi -f
root@docker:~# docker images --format '{{.Repository}}:{{.Tag}}' | grep 'wingysam/christmas-community:' | xargs docker rmi -f
Untagged: wingysam/christmas-community:latest
Untagged: wingysam/christmas-community@sha256:34a3ab430d37f4b832e0b5cee37299649a2af77469cd9a736a8feccaa8420ee3
Error response from daemon: invalid reference format
~~I deleted the container and ran docker image prune -a
and it seems to work now.~~
I lied
2023-12-21T22:04:41.245214834Z
2023-12-21T22:04:41.245286461Z > [email protected] start
2023-12-21T22:04:41.245295449Z > node src/manager.js
2023-12-21T22:04:41.245301660Z
2023-12-21T22:04:42.839600693Z [ EXPRESS ] Express server started on port 80!
2023-12-21T22:04:42.840169017Z [ DB EXPOSE ] DB has been exposed on port 8080
2023-12-21T22:04:49.683545397Z Updated get-product-name
2023-12-21T22:04:49.761513292Z node:internal/modules/cjs/loader:1147
2023-12-21T22:04:49.761553340Z throw err;
2023-12-21T22:04:49.761560865Z ^
2023-12-21T22:04:49.761567027Z
2023-12-21T22:04:49.761573001Z Error: Cannot find module 'session-pouchdb-store'
2023-12-21T22:04:49.761594373Z Require stack:
2023-12-21T22:04:49.761600794Z - /usr/src/app/src/index.js
2023-12-21T22:04:49.761607006Z at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
2023-12-21T22:04:49.761613948Z at Module._load (node:internal/modules/cjs/loader:985:27)
2023-12-21T22:04:49.761624913Z at Module.require (node:internal/modules/cjs/loader:1235:19)
2023-12-21T22:04:49.761631499Z at require (node:internal/modules/helpers:176:18)
2023-12-21T22:04:49.761637451Z at Object.<anonymous> (/usr/src/app/src/index.js:5:22)
2023-12-21T22:04:49.761643798Z at Module._compile (node:internal/modules/cjs/loader:1376:14)
2023-12-21T22:04:49.761653808Z at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
2023-12-21T22:04:49.761660112Z at Module.load (node:internal/modules/cjs/loader:1207:32)
2023-12-21T22:04:49.761666140Z at Module._load (node:internal/modules/cjs/loader:1023:12)
2023-12-21T22:04:49.761672241Z at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) {
2023-12-21T22:04:49.761682568Z code: 'MODULE_NOT_FOUND',
2023-12-21T22:04:49.761698721Z requireStack: [ '/usr/src/app/src/index.js' ]
2023-12-21T22:04:49.761704759Z }
2023-12-21T22:04:49.761710553Z
2023-12-21T22:04:49.761716438Z Node.js v20.10.0
2023-12-21T22:04:49.841651650Z node:internal/modules/cjs/loader:1147
2023-12-21T22:04:49.841726513Z throw err;
2023-12-21T22:04:49.841734078Z ^
2023-12-21T22:04:49.841756299Z
2023-12-21T22:04:49.841762253Z Error: Cannot find module 'session-pouchdb-store'
2023-12-21T22:04:49.841805930Z Require stack:
2023-12-21T22:04:49.841824234Z - /usr/src/app/src/index.js
2023-12-21T22:04:49.841830366Z at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
2023-12-21T22:04:49.841850996Z at Module._load (node:internal/modules/cjs/loader:985:27)
2023-12-21T22:04:49.841857044Z at Module.require (node:internal/modules/cjs/loader:1235:19)
2023-12-21T22:04:49.841868823Z at require (node:internal/modules/helpers:176:18)
2023-12-21T22:04:49.841875236Z at Object.<anonymous> (/usr/src/app/src/index.js:5:22)
2023-12-21T22:04:49.841882454Z at Module._compile (node:internal/modules/cjs/loader:1376:14)
2023-12-21T22:04:49.841888510Z at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
2023-12-21T22:04:49.841898528Z at Module.load (node:internal/modules/cjs/loader:1207:32)
2023-12-21T22:04:49.841904807Z at Module._load (node:internal/modules/cjs/loader:1023:12)
2023-12-21T22:04:49.841911004Z at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) {
2023-12-21T22:04:49.841921865Z code: 'MODULE_NOT_FOUND',
2023-12-21T22:04:49.841927985Z requireStack: [ '/usr/src/app/src/index.js' ]
2023-12-21T22:04:49.841934030Z }
2023-12-21T22:04:49.841939855Z
2023-12-21T22:04:49.841945818Z Node.js v20.10.0
2023-12-21T22:04:49.917899587Z node:internal/modules/cjs/loader:1147
2023-12-21T22:04:49.917963442Z throw err;
2023-12-21T22:04:49.917971273Z ^
2023-12-21T22:04:49.917977325Z
2023-12-21T22:04:49.917983432Z Error: Cannot find module 'session-pouchdb-store'
2023-12-21T22:04:49.917989462Z Require stack:
2023-12-21T22:04:49.917995486Z - /usr/src/app/src/index.js
2023-12-21T22:04:49.918007509Z at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
2023-12-21T22:04:49.918014189Z at Module._load (node:internal/modules/cjs/loader:985:27)
2023-12-21T22:04:49.918020277Z at Module.require (node:internal/modules/cjs/loader:1235:19)
2023-12-21T22:04:49.918026249Z at require (node:internal/modules/helpers:176:18)
2023-12-21T22:04:49.918036957Z at Object.<anonymous> (/usr/src/app/src/index.js:5:22)
2023-12-21T22:04:49.918043766Z at Module._compile (node:internal/modules/cjs/loader:1376:14)
2023-12-21T22:04:49.918049892Z at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
2023-12-21T22:04:49.918061592Z at Module.load (node:internal/modules/cjs/loader:1207:32)
2023-12-21T22:04:49.918067968Z at Module._load (node:internal/modules/cjs/loader:1023:12)
2023-12-21T22:04:49.918073994Z at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) {
2023-12-21T22:04:49.918080198Z code: 'MODULE_NOT_FOUND',
2023-12-21T22:04:49.918097078Z requireStack: [ '/usr/src/app/src/index.js' ]
2023-12-21T22:04:49.918103760Z }
2023-12-21T22:04:49.918109788Z
2023-12-21T22:04:49.918115611Z Node.js v20.10.0
2023-12-21T22:04:50.051566214Z node:internal/modules/cjs/loader:1147
2023-12-21T22:04:50.051637055Z throw err;
2023-12-21T22:04:50.051660805Z ^
2023-12-21T22:04:50.051667677Z
2023-12-21T22:04:50.051675544Z Error: Cannot find module 'session-pouchdb-store'
2023-12-21T22:04:50.051686115Z Require stack:
2023-12-21T22:04:50.051696530Z - /usr/src/app/src/index.js
2023-12-21T22:04:50.051711971Z at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
2023-12-21T22:04:50.051719205Z at Module._load (node:internal/modules/cjs/loader:985:27)
2023-12-21T22:04:50.051725422Z at Module.require (node:internal/modules/cjs/loader:1235:19)
2023-12-21T22:04:50.051731389Z at require (node:internal/modules/helpers:176:18)
2023-12-21T22:04:50.051741290Z at Object.<anonymous> (/usr/src/app/src/index.js:5:22)
2023-12-21T22:04:50.051747968Z at Module._compile (node:internal/modules/cjs/loader:1376:14)
2023-12-21T22:04:50.051754165Z at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
2023-12-21T22:04:50.051760460Z at Module.load (node:internal/modules/cjs/loader:1207:32)
2023-12-21T22:04:50.051770301Z at Module._load (node:internal/modules/cjs/loader:1023:12)
2023-12-21T22:04:50.051776527Z at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) {
2023-12-21T22:04:50.051782705Z code: 'MODULE_NOT_FOUND',
2023-12-21T22:04:50.051788658Z requireStack: [ '/usr/src/app/src/index.js' ]
2023-12-21T22:04:50.051812623Z }
2023-12-21T22:04:50.051821869Z
2023-12-21T22:04:50.051844530Z Node.js v20.10.0
2023-12-21T22:04:50.149771770Z node:internal/modules/cjs/loader:1147
2023-12-21T22:04:50.149841929Z throw err;
2023-12-21T22:04:50.149850332Z ^
2023-12-21T22:04:50.149875098Z
etc.
I'm not really sure what's going on. Have you tried running :latest?
same error
for extra info this is my compose file, ran via portainer
version: "3"
services:
christmas-community:
image: wingysam/christmas-community:latest
volumes:
- /media/config/christmas-community:/data
ports:
- 8080:80
environment:
PUID: PUID
PGID: PUID
SITE_TITLE: "Title"
SHORT_TITLE: "Wishlist"
SMILE: 'true'
TABLE: 'true'
SINGLE_LIST: 'true'
LISTS_PUBLIC: 'true'
MARKDOWN: 'true'
TRUST_PROXY: ip
restart: unless-stopped
Hey @xoxfaby just for testing purpose, could you please run a new container without any persistant data and see what append please ?
docker run -p 8081:80 -it wingysam/christmas-community:latest
Hey @xoxfaby just for testing purpose, could you please run a new container without any persistant data and see what append please ?
docker run -p 8081:80 -it wingysam/christmas-community:latest
same error
Try running it with no env variables?
@xoxfaby please make shure the file permissions on "/media/config/christmas-community" and all of its subdirectories are correct e.g. the files can be accessed by docker and TRUST_PROXY
doesn't have the value ip
but an IP-Address instead.
and how did you make the error change ?
I am sadly unable to reproduce the error reliably, but to me it looks like missing permissions presumably on some folder, furthermore I wonder if PGID: PUID
, should be PGID: PGID
Try running it with no env variables?
wouldn't @zethis test have done that?
Try running it with no env variables?
wouldn't @zethis test have done that?
In theory yes. In reality your error already changed once from Error: Cannot find module 'child-process-promise'
to Error: Cannot find module 'session-pouchdb-store'
which I find very strange already and without any complete logs for any one of the incidents I don't really know what is behind same error
here.
So I just made suggestions based on what seemed to be the issue when I was able to reproduce the error and furthermore matched the logs you provided so far.
I have been getting both of these the whole time.