NodeJS Deploy not working

i deployed a nodeJS webservice and it deploys successfully and my server started console is visible but the service is not going live, like it will just keep showing deploying until time runs out



==> Cloning from https://github.com/Havocweb-tech/mobyl-wallet-API
==> Checking out commit 930f0e66328c268e5d7352d2e9043b2b6a8039e6 in branch main
==> Downloading cache...
==> Transferred 116MB in 7s. Extraction took 3s.
==> Requesting node version >=16.14
==> Using Node version 21.7.3 via /opt/render/project/src/package.json
==> Docs on specifying a Node version: https://render.com/docs/node-version
==> Using Bun version 1.1.0 (default)
==> Docs on specifying a bun version: https://render.com/docs/bun-version
==> Running build command 'yarn'...
yarn install v1.22.22
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning "flutterwave-node-v3 > eslint-config-prettier@8.10.0" has unmet peer dependency "eslint@>=7.0.0".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 13.37s.
==> Uploading build...
==> Build uploaded in 8s
==> Build successful 🎉
==> Deploying...
==> Requesting node version >=16.14
==> Using Node version 21.7.3 via /opt/render/project/src/package.json
==> Docs on specifying a Node version: https://render.com/docs/node-version
==> Using Bun version 1.1.0 (default)
==> Docs on specifying a bun version: https://render.com/docs/bun-version
==> Running 'nodemon start'
[nodemon] 3.0.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node start index.js`
dpg-cob47pmn7f5s739cidug-a.oregon-postgres.render.com
/opt/render/project/src/public
(node:108) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
 backend server started 
 Successfully connected to the database 



it’s been like this for 26mins

Hi there,

Based on the log output you provided, I’m seeing a couple things you may want to change:

  • Build command is yarn with the start command as nodemon start
    • We don’t recommend using nodemon in the start command. Try npm start instead
  • warning package-lock.json found
    • If you want to use package.json for your dependencies, change the build command to npm install. In any case, it’s best to be consistent with your use of either yarn or npm and their related config files

Let us know if you have any further questions.

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)

i just did what you said same thing happened nothing changed:

==> Cloning from https://github.com/Havocweb-tech/mobyl-wallet-API
==> Checking out commit 22358e0a4fd42d652c89e8f822032f9646605d64 in branch main
==> Downloading cache...
==> Requesting node version >=16.14
==> Using Node version 21.7.3 via /opt/render/project/src/package.json
==> Docs on specifying a Node version: https://render.com/docs/node-version
==> Using Bun version 1.1.0 (default)
==> Docs on specifying a bun version: https://render.com/docs/bun-version
==> Running build command 'npm install'...
added 73 packages, and audited 506 packages in 2s
50 packages are looking for funding
  run `npm fund` for details
19 vulnerabilities (14 moderate, 4 high, 1 critical)
To address issues that do not require attention, run:
  npm audit fix
To address all issues possible (including breaking changes), run:
  npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
==> Uploading build...
==> Transferred 116MB in 8s. Extraction took 2s.
==> Deploying...
==> Build uploaded in 7s
==> Build successful 🎉
==> Requesting node version >=16.14
==> Using Node version 21.7.3 via /opt/render/project/src/package.json
==> Docs on specifying a Node version: https://render.com/docs/node-version
==> Using Bun version 1.1.0 (default)
==> Docs on specifying a bun version: https://render.com/docs/bun-version
==> Running 'npm start'
> mobyl-wallet-api@1.0.0 start
> nodemon start
[nodemon] 3.0.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node start index.js`
dpg-cob47pmn7f5s739cidug-a.oregon-postgres.render.com
/opt/render/project/src/public
(node:121) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
 backend server started 
 Successfully connected to the database 

I just solved it, Let me explain the problem incase of anyone going through same issue right now.
the problem was that i had an environmental variable named PORT and the also another variable name PORTS i tried using the Later as the service port and the Former as the database port, but the service was trying to run on the database port and my service is running in another port. It works perfectly now THANKS