17

I'm working with node-webkit, Sequelize and sqlite3. Node runs the app with no problems, but when I run it from node-webkit it throws me this Error

"Uncaught Error: The dialect sqlite is not supported. (Error: Please install sqlite3 package manually)", source: /Users/mariowise/projects/node-webkit/requies-pos/node_modules/sequelize/lib/sequelize.js (176)

This are my dependencies

"dependencies": {
    "express": "~4.2.0",
    "static-favicon": "~1.0.0",
    "morgan": "~1.0.0",
    "cookie-parser": "~1.0.1",
    "body-parser": "~1.0.0",
    "debug": "~0.7.4",
    "jade": "~1.3.0",
    "nunjucks": "^1.0.5",
    "sqlite3": "~2.1.19",
    "config": "0.4.33",
    "sequelize": "~2.0.0-rc1",
    "sequelize-sqlite": "~1.7.0"
}
mariowise
  • 2,167
  • 2
  • 21
  • 34
  • Hmm, strange, i'm not familiar with node-webkit but sequelize just require's sqlite so it uses the regular npm lookup. You can remove sequelize-sqlite as a dependency by the way, just use sequelize and sqlite3 – Mick Hansen Sep 24 '14 at 07:33

1 Answers1

5

Per the sqlite3 module documentation, it looks like you'll need to build a node-webkit specific version of sqlite3 from source rather than relying on the version direct from npm:

https://github.com/mapbox/node-sqlite3#building-for-node-webkit

Jeff Sisson
  • 1,616
  • 11
  • 22
  • If helps someone, this worked for me with `node@0.12.3`. Some how i've installed `node@0.12.0-alpha2` and it was not working. So there you go. Sorry the late validation, but just today I had time to test this. Thank you very much Jeff. – mariowise Mar 10 '16 at 14:35