Required configuration option 'client' is missing.
See original GitHub issueDocumentation states:
You can even use knex without a connection, just for its query building features.
Though running direct example from docs:
const knex = require(‘knex’)({});
Throws error:
> knex = require('knex')({})
Error: knex: Required configuration option 'client' is missing.
at new Client (/home/ginden/.../node_modules/knex/lib/client.js:108:11)
at Knex (/home/ginden/.../node_modules/knex/lib/index.js:60:34)
at repl:1:23
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Knex required configuration option 'client' is missing error
The problem is that your typescript export default is not supported by knex cli by default. ... As you can see, you can...
Read more >Knex required configuration option 'client' is missing error
The problem is that your typescript export default is not supported by knex cli by default. ... As you can see, you can...
Read more >Error with knex self-hosted - Installation - Ghost Forum
Error: knex: Required configuration option 'client' is missing. ... It looks like you have not properly configured the database property in your ...
Read more >tgriesser/knex - Gitter
node -r dotenv/config node_modules/.bin/knex seed:run Using environment: ... throw new Error(`knex: Required configuration option 'client' is missing.`);.
Read more >heroku knex required configuration option client is missing,
heroku knex required configuration option client is missing ... Most likely the default used by Knex is not right so it's best to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Ginden , it raised due to two reasons at my side and so sharing for ease Error: knex: Required configuration option ‘client’ is missing.
Wrong environment name in the knexfile.js. In my .env NODE_ENV = development and at knexfile.js there was no entry in it
Docs are out of date: https://github.com/knex/documentation/issues/28