Can't run Dockerimage of Next application on external server
Unanswered
Giant panda posted this in #help-forum
Giant pandaOP
As the title says I can't run my Next application in a Docker container on an external server. But the exact same image works on my local device.
If I try to run I always get this error:
I've already tried multiple different ways to build the image like creating a build inside the image and start. Just copy everything and then run npm run dev etc.
I just don't figure out what my error is. Does someone have experience with this?
If I try to run I always get this error:
node:internal/modules/cjs/loader:1228
throw err;
^
Error: Cannot find module '/app/app'
at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
at Module._load (node:internal/modules/cjs/loader:1051:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:173:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v20.18.1I've already tried multiple different ways to build the image like creating a build inside the image and start. Just copy everything and then run npm run dev etc.
I just don't figure out what my error is. Does someone have experience with this?