These dependencies were not found where using knex with sqlite client
See original GitHub issueEnvironment
Knex version: “knex”: “^0.20.11” Database + version: “sqlite3”: “^4.1.1” OS: Winows 10
Bug
- Explain what kind of behaviour you are getting and how you think it should do
I initialize a new Knex with client: “sqlite” but i get an error specifying that other dialect are missing:
My code
class Database {
constructor( pathToDbFile ) {
this.knex = require('knex')({
client: 'sqlite3',
connection: {
filename: pathToDbFile
}
});
}
}
module.exports = Database;
- Error message
These dependencies were not found:
- mssql in ./node_modules/knex/lib/dialects/mssql/index.js
- mssql/lib/base in ./node_modules/knex/lib/dialects/mssql/index.js
- mssql/package.json in ./node_modules/knex/lib/dialects/mssql/index.js
- mysql in ./node_modules/knex/lib/dialects/mysql/index.js
- mysql2 in ./node_modules/knex/lib/dialects/mysql2/index.js
- oracledb in ./node_modules/knex/lib/dialects/oracledb/index.js
- pg in ./node_modules/knex/lib/dialects/postgres/index.js, ./node_modules/knex/lib/dialects/redshift/index.js
- pg-query-stream in ./node_modules/knex/lib/dialects/postgres/index.js
- tedious in ./node_modules/knex/lib/dialects/mssql/index.js
To install them, you can run: npm install --save mssql mssql/lib/base mssql/package.json mysql mysql2 oracledb pg pg-query-stream tedious
ERROR Build failed with errors.
error Command failed with exit code 1.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
How to fix Cannot find module '@vscode/sqlite3' when running ...
It would appear that Knex is somehow expecting to find the Sqlite3 resources it needs inside of a node_modules/@vscode/sqlite3. Hence it is ......
Read more >Installation | Knex.js
When you use the SQLite3 or Better-SQLite3 adapter, there is a filename ... This function receives no parameters, and returns either a configuration...
Read more >knex - npm
A SQL query builder that is flexible, portable, and fun to use! A batteries-included, multi-dialect (PostgreSQL, MySQL, CockroachDB, MSSQL, ...
Read more >knex | Yarn - Package Manager
A SQL query builder that is flexible, portable, and fun to use! A batteries-included, multi-dialect (PostgreSQL, MySQL, CockroachDB, MSSQL, SQLite3, ...
Read more >Configuring Knex - DEV Community
If we work with a SQLite database in our project, for instance, we would have a dependency on the knex module and the...
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
If someone goes through here, here is the solution
How to configure this in build, or in production mode. It seems that I cant make it work in production.