SQLite package has not been found installed! while using with typeorm

See original GitHub issue

Describe the bug I have typeorm , sqlite3 installed have invoked vue invoke electron-builder still the browser outputs -

DriverPackageNotInstalledError: SQLite package has not been found installed. Try to install it: npm install sqlite3 --save at new DriverPackageNotInstalledError (webpack-internal:///./node_modules/typeorm/browser/error/DriverPackageNotInstalledError.js:11:28) at SqliteDriver.loadDependencies (webpack-internal:///./node_modules/typeorm/browser/driver/sqlite/SqliteDriver.js:126:19) at new SqliteDriver (webpack-internal:///./node_modules/typeorm/browser/driver/sqlite/SqliteDriver.js:32:15) at DriverFactory.create (webpack-internal:///./node_modules/typeorm/browser/driver/DriverFactory.js:51:24) at new Connection (webpack-internal:///./node_modules/typeorm/browser/connection/Connection.js:74:98) at ConnectionManager.create (webpack-internal:///./node_modules/typeorm/browser/connection/ConnectionManager.js:59:26) at eval (webpack-internal:///./node_modules/typeorm/browser/index.js:499:66) at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:123:23) at Object.eval [as next] (webpack-internal:///./node_modules/tslib/tslib.es6.js:104:53) at eval (webpack-internal:///./node_modules/tslib/tslib.es6.js:97:71)

i even added -

module.exports = { pluginOptions: { electronBuilder: { // List native deps here if they don’t work externals: [‘sqlite3’], // If you are using Yarn Workspaces, you may have multiple node_modules folders // List them all here so that VCP Electron Builder can find them nodeModulesPath: [‘…/…/node_modules’, ‘./node_modules’] } }, chainWebpack: config => { config.merge({ externals: { sqlite3: ‘commonjs sqlite3’ } }) } };

to the vue.config.js

Environment (please complete the following information):

  • OS and version: MacOS
  • node version: 12.14.0
  • npm version: 6.10.3
  • yarn version (if used):
  • vue-cli-plugin-electron-builder version : @latest
  • electron version: 6.0.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
nklaymancommented, Apr 6, 2020

You need to add typeorm as an external. When I set the vue.config.js to the following, it worked fine:

module.exports = {
    pluginOptions: {
        electronBuilder: {
            externals: ['typeorm', 'sequelize', 'sequelize-typescript', 'sqlite3'],
        }
    },
};
0reactions
michaelspeedcommented, Apr 6, 2020

thanks a lot it worked

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: DriverPackageNotInstalledError: SQLite package has ...
If typeorm option is specified as database:':memory' , sqlite is created and used in the running instance using the sqlite3 library.
Read more >
typeorm/Lobby - Gitter
Mysql package has not been found installed. Try to install it: npm install mysql --save. But i already had both typeorm and mysql...
Read more >
Getting an error about SQLite when attempting to run after ...
Hey everyone! I'm running into an issue when I am attempting to install n8n. Just for reference, I'm running this on a digital...
Read more >
SQLite package not found in Electron/TypeORM : r/webdev
I'm working on an app that's based on Electron (1.7), TypeORM (0.2.6), SQLite3 ... Error: SQLite package has not been found installed.
Read more >
SQLite package has not been found installed! while using with ...
SQLite package has not been found installed ! while using with typeorm.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found