Unable to dockerize my NextJS app! #61625
Replies: 4 comments 5 replies
-
Try this in your build phase: This fixed the issue for me although i don't know what is the cause. Seems like latest NextJs ignores the 'output' key |
Beta Was this translation helpful? Give feedback.
-
Encountering the same thing :( |
Beta Was this translation helpful? Give feedback.
-
I have experienced the same issue a while ago and, as far as I remember, I fixed it by replacing
with
|
Beta Was this translation helpful? Give feedback.
-
if you got |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I am trying to dockerize my Next (14) app’s production build using the exact same file (pasted below) as given in this official repo: https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile.
The only addition is that I have a couple of Prisma commands in the builder stage right after
COPY . .
.But no matter how many times I try,
docker-compose up --build
keeps failing with the following error:Error: Cannot find module '/app/server.js'
I also have the following entry in my next.config.js:
output: "standalone",
Can anyone at Vercel please help figure out what I am missing?
Additional information
Example
https://github.com/schandillia/poco/tree/auth
Beta Was this translation helpful? Give feedback.
All reactions