Can't find build artifacts

I’m deploying a nodejs application.

In Build Command, I’m running yarn install && yarn build which produces node_modules and dist directories. In Start Command, I’m running node ./dist/index.js, which fails because there’s no dist directory found.

It seems the dist folder is not uploaded on a build step, since I can’t see neither it nor node_modules when I’m logging into a container via shell.

I’m wondering what might be the root cause of that.

Deploy logs:

Sep 22 03:20:44 PM  ==> Uploading build...
Sep 22 03:21:15 PM  ==> Build uploaded in 13s
Sep 22 03:21:15 PM  ==> Build successful 🎉
Sep 22 03:21:15 PM  ==> Deploying...
Sep 22 03:22:11 PM  ==> Detected Node version 16.17.0
Sep 22 03:22:11 PM  ==> Starting service with 'yarn serve'
Sep 22 03:22:12 PM  yarn run v1.22.5
Sep 22 03:22:12 PM  $ node ./dist/index.js
Sep 22 03:22:12 PM  node:internal/modules/cjs/loader:959
Sep 22 03:22:12 PM    throw err;
Sep 22 03:22:12 PM    ^
Sep 22 03:22:12 PM  
Sep 22 03:22:12 PM  Error: Cannot find module '/opt/render/project/src/dist/index.js'

Hi there,

Thanks for reaching out.

I’ve replied to the chat you started.

Kind regards


Which chat can you answer here too so that everyone can see!!

It was an issue in their code, the path was wrong.

If you have an issue, feel free to open a new topic describing your problem, or raise a ticket