Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ElectronJs: please install sqlite3 package manually

I was trying to configure sqlite database with electron application and after install sqlite dependency I was start getting the error please install sqlite3 package manually. I repeat the same steps several time but sqlite doesn't work with the electron

I just search about this problem over the internet and I found couple of answer but each answer have missing steps. So After spend my 4 working days on this issue I come up with a solid solution with all detailed steps. Hopefully it can save the time for other

like image 804
UFFAN AHMED Avatar asked Mar 30 '18 23:03

UFFAN AHMED


1 Answers

If you use sqlite3 via sequelize, you can avoid the error with adding sequelize to externals of webpack.config like this.

module.exports = {
  // other configs ..
  externals: {
    "sequelize": "require('sequelize')",
  },
}

Reference: https://www.bountysource.com/issues/38723672-can-not-pack-sequelize-with-sqlite3

like image 173
asukiaaa Avatar answered Sep 21 '22 03:09

asukiaaa