Nextjs fails to find valid build in the '.next' directory in production node_env
I am running my app in docker, but my production build and start script fails only in docker environment. Although node_env development works well in docker environment. Here is my script that fails to make a production build and start a server. I am using nodemon and babel "build:prod": { "command": "babel ./src/server/ -d server --presets es2015,stage-2 && next build src", "env": { "NODE_ENV": "production" } }, "start:prod": { "command": "PORT=3000 nodemon --watch ./src/server/ ./src/server/server.js --exec babel-node --presets es2015,stage-2", "env": { "NODE_ENV": "production" } } But when