DEV Community

Discussion on: Dockerising a Next.js project

Collapse
 
mfeltscher profile image
Moreno Feltscher

I love the approach you took in order to ship a minimal image for production! Unfortunately I'm getting the following error when trying to use you example with Next v10.0.5:
Error: > Couldn't find a pages directory. Please create one under the project root

I don't really get why Next isn't just using what's in .next... Do you maybe have any idea what's causing this?

Collapse
 
mfeltscher profile image
Moreno Feltscher

Nevermind, had an issue with running the production app. Fixed it and now your example works like a charm!

Collapse
 
levpa profile image
Lev Pa

Please, share that fix...

Thread Thread
 
mfeltscher profile image
Moreno Feltscher

Well, not as impressive as it might sound but I for some reason ran next instead of next start 🙈