Unable to dockerize my NextJS app! #61625
Unanswered
schandillia
asked this question in
Help
Replies: 2 comments 1 reply
-
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.
1 reply
-
Encountering the same thing :( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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