I’m trying to deploy my server-side on Render as a Web Service and it’s not working, but locally it works fine.
Once I make a request GET to any route, it gives me this error.
Logs:
Nov 14 11:35:33 AM
Nov 14 11:35:33 AM
Nov 14 11:35:33 AM PrismaClientInitializationError:
Nov 14 11:35:33 AM Invalid prisma.dealer.findMany()
invocation:
Nov 14 11:35:33 AM
Nov 14 11:35:33 AM
Nov 14 11:35:33 AM Can’t reach database server at localhost
:5432
Nov 14 11:35:33 AM
Nov 14 11:35:33 AM Please make sure your database server is running at localhost
:5432
.
Nov 14 11:35:33 AM at Cn.handleRequestError (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:123:7090)
Nov 14 11:35:33 AM at Cn.handleAndLogRequestError (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:123:6206)
Nov 14 11:35:33 AM at Cn.request (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:123:5926)
Nov 14 11:35:33 AM at async l (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:128:9968)
Nov 14 11:35:33 AM at async getDealerRequests (/opt/render/project/src/controllers/dealer.controller.js:76:18) {
Nov 14 11:35:33 AM clientVersion: ‘5.5.2’,
Nov 14 11:35:33 AM errorCode: undefined
Nov 14 11:35:33 AM }
Nov 14 11:35:37 AM ==> Using Node version 16.14.2 via environment variable NODE_VERSION
Nov 14 11:35:37 AM ==> Docs on specifying a Node version: Setting Your Node.js Version | Render Docs
Nov 14 11:35:37 AM ==> Running ‘node index.js’
Nov 14 11:35:39 AM Using Node version for Render: v16.14.2
Nov 14 11:35:39 AM Server running on port: 4000