Sqlite driver in Webpack/Electron on 0.2.28: (TypeError): this.driver.connect is not a function
See original GitHub issueIssue type:
[x] bug report [ ] feature request [ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql
/ mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[x] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
0.2.28
Steps to reproduce or a small repository showing the problem:
Clone the reproduction repo at https://github.com/jjhbw/typeorm-webpack-electron-repro
See simple instructions on how to trigger the error in the repo’s README.
Note that the invocation of createConnection
resides in src/App.js
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (15 by maintainers)
Top Results From Across the Web
Typeorm not working in my electron app (this.driver connect is ...
It seems like an Issue of me being in browser not having direct access to node.js sqlite driver, but according to typeorm docs...
Read more >typeorm error driver not connected - You.com | The AI Search ...
I tried to use typeorm for aws lambda functions. A first query to database worked. But after first query(after connection established), all queries...
Read more >typeorm: CHANGELOG
we do not call JSON.stringify() to json/jsonb column types in Postgres. Instead, we delegate value directly to underlying pg driver.
Read more >sqlite3 - Go Packages
Package sqlite3 provides interface to SQLite3 databases. This works as a driver for database/sql. Installation go get github.com/mattn/go- ...
Read more >Connect To The SQLite Database Using SQLite JDBC Driver
In this tutorial, we will show you how to download SQLite JDBC Driver and connect to the SQLite database via JDBC, source code...
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 FreeTop 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
Top GitHub Comments
@dominicdesu @jjhbw First sorry for my english kk, i am creating an application using vue and electron and encountered the same problem, i solved this with folow config in webpack
My solution was this and electron builder config, for you this solution should solve. The original webpack documentation: https://webpack.js.org/configuration/externals/#externals The issue where encountered the solution for my problem: https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/699
Yes, i’m aware. Hence my snark regarding the hypothetical devs who try to use it in a browser context. 😉
Ah, that makes sense. Did not think of that case. In light of that, I’d say you’re right not to accommodate this in TypeORM… I guess the only way is to get Webpack to fix the mainFields issue instead.
Thanks for the time you spend on this library! Much appreciated.