node-webkit错误:请手动安装sqlite3包

时间:2014-09-21 00:09:53

标签: node.js sqlite node-webkit sequelize.js

我正在使用node-webkitSequelizesqlite3。 Node运行应用程序没有任何问题,但是当我从node-webkit运行它时,它会抛出这个错误

"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)

这是我的依赖

"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"
}

1 个答案:

答案 0 :(得分:4)

根据sqlite3模块文档,您似乎需要从源代码构建一个node-webkit特定版本的sqlite3,而不是直接依赖于来自npm的版本:

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