Render error: cannot find module '/opt/render/project/src/dist/main'

I’m attempting to deploy a NestJs server.
Here is the Githhub link: GitHub - jmichaelterenin/smartpay-shop

When I leave the root-directory blank I get the above error when it’s trying to deploy. When I enter the name of my project from package.json: smartpay-shop as the root-directory, based on [Error: Cannot find module ‘/opt/render/project/src/app.js’] topic (can only provide 1 link), I get:

Mar 18 04:53:15 PM ==> It looks like we don’t have access to your repo, but we’ll try to clone it anyway.
Mar 18 04:53:15 PM ==> Cloning from GitHub - jmichaelterenin/smartpay-shop
Mar 18 04:53:16 PM line 40: cd: /opt/render/project/src/smartpay-shop: No such file or directory


The Root Directory is used for specifying a directory with your repo that should be used instead of the root of the repo itself. This is helpful for monorepos.

The Github repo you linked doesn’t look like a monorepo and a smartpay-shop directory isn’t present, so the No such file or directory in the error seems valid.


Thanks for your reply!
Correct, this is not a monorepo, this is a backend API web-service using NestJs. Does render not support NestJs? I’ve tried setting the root directory to smartpay-shop and I get a clone error.

Node is available, so NestJs is fine. As I mentioned, the repo you shared doesn’t have a smartpay-shop folder in there, so it appears you don’t need to set a Root Directory at all.