mern-authentication icon indicating copy to clipboard operation
mern-authentication copied to clipboard

Error: module not found: app/build/index.js

Open PhantomGuru0427 opened this issue 2 years ago • 2 comments

docker compose -f docker-compose.prod.yml --env-file client.prod.env up --build I am trying to run this command for production mode, but it caused error. In server, docker file is CMD ["yarn", "start:prod"] package.json is "scripts": { "build": "tsc-alias --project tsconfig.json", "dev": "ts-node-dev --respawn -r tsconfig-paths/register index.ts", "start": "yarn build && node build/index.js", "start:prod": "node build/index.js", "ci": "yarn install --frozen-lockfile" },

PhantomGuru0427 avatar Jun 26 '23 06:06 PhantomGuru0427

Please share your error when you run the command. Have you created a server.prod.env file ? This is required to get it run.

Edit: Error: module not found: app/build/index.js ok missed the error.. seems something went wrong when building the server code in docker build.

I'll try to have a look after Github outage

flaviuse avatar Jun 29 '23 17:06 flaviuse