Next.js Discord

Discord Forum

nextjs Docker - Could not find a production build in the '.next' directory

Unanswered
Sharp-tailed Grouse posted this in #help-forum
Open in Discord
Sharp-tailed GrouseOP
docker run -p 3000:3000 web-sphere:latest

web-sphere@0.1.0 start
next start

▲ Next.js 14.2.3
- Local: http://localhost:3000

✓ Starting...
Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id
at setupFsCheck (/app/node_modules/next/dist/server/lib/router-utils/filesystem.js:151:19)
at async initialize (/app/node_modules/next/dist/server/lib/router-server.js:61:23)
at async Server.<anonymous> (/app/node_modules/next/dist/server/lib/start-server.js:249:36)
pradiep@pradiep:/var/www/html/web-sphere$ docker run -p -d 3000:3000 web-sphere:latest

how to fix this issue please help me anyone

0 Replies