Error: knex: Unknown configuration option 'client' value

Viewed 132

I am trying to connect a postgres database on heroku to a server I hosted on heroku. Ater running git push heroku main successfully, I then ran heroku logs --tail to get the logs, and I got this error  Error: knex: Unknown configuration option 'client' value

I don't know what this means, and consequently, the database doesn't seem to be connected to my server and I get a 404 error anytime I try to use my app to fetch. My server.js code snippet

const knex = require('knex');

const db = knex({
  client: 'pg',
  connection: {
    connectionString: process.env.DATABASE_URL,
    ssl: {
      rejectUnauthorized: false,
    },
  },
});

package.json

{
  "name": "facedetection_api",
  "version": "1.0.0",
  "description": "",
  "main": "server.js",
  "scripts": {
    "start": "node server.js",
    "start:dev": "nodemon server.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "nodemon": "^2.0.15"
  },
  "dependencies": {
    "bcryptjs": "^2.4.3",
    "clarifai": "^2.9.1",
    "cors": "^2.8.5",
    "express": "^4.17.3",
    "knex": "^1.0.4",
    "pg": "^8.7.3"
  }
}
0 Answers
Related