NPM Workspaces changing root folder causes deploy error "No open ports detected"

Hi I have a webservice on render that consists of a node/react app. The file directory is as such:

root
  client
  server

Previously I was using “/server” as my root directory on render in the build settings.

I’d like to introduce npm workspaces to clean things up. The file directory is essentially the same except there is now a package.json file in the root folder as well. It would make sense to me that when I do this, I would remove “/server” as my root directory. When I do this however, the application builds but does not deploy successfully.

The error message I get is:

==> Port scan timeout reached, no open ports detected. Bind your service to at least one port. If you don't need to receive traffic on any port, create a background worker instead.
==> Docs on specifying a port: https://render.com/docs/web-services#port-binding
==> Timed out: Port scan timeout reached, no open ports detected. Bind your service to at least one port. If you don't need to receive traffic on any port, create a background worker instead.

I have not found the port binding docs to be especially helpful.

Has anyone else encountered this error and could advise me on how to resolve it?

Thanks!

Hi there,

There isn’t enough information to know why changing the root directory would cause this issue. I don’t think this is specifically why it is happening. If you did change the root directory, you would also likely need to change your build and start command.

To investigate what is happening here more closely, can you please open a ticket directly with us from our dashboard? Use the contact support link in the bottom right corner.

Regards,

Keith
Render Support, UTC+10 :australia:

My build command changed from

export REACT_APP_GOOGLE_MAPS_API_KEY=XXX && npm install && cd ../client && npm install && npm run build

to

export REACT_APP_GOOGLE_MAPS_API_KEY=XXX && npm install --loglevel verbose && npm run build --workspace client

as part of these changes

Hi there,

Looks like you opened a ticket directly with us. We can follow this issue up on that one.

Regards,

Keith
Render Support, UTC+10 :australia:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.