sqlite - NodeJS + AppJS + Sqlite3

标签 sqlite node.js npm node-gyp appjs

我正在尝试将 SQLite3 模块构建到我的项目中。 如果我运行 NPM install sqlite3 它会失败。这是我的 npm-debug.log 相关内容:

235 info install sqlite3@2.1.5
236 verbose unsafe-perm in lifecycle true
237 silly exec cmd "/c" "node-gyp rebuild"
238 silly cmd,/c,node-gyp rebuild,C:\NodeWorkbench\AppJS Workspace\template\data\node_modules\sqlite3 spawning
239 info sqlite3@2.1.5 Failed to exec install script
240 info C:\NodeWorkbench\AppJS Workspace\template\data\node_modules\sqlite3 unbuild
241 verbose from cache C:\NodeWorkbench\AppJS Workspace\template\data\node_modules\sqlite3\package.json
242 info preuninstall sqlite3@2.1.5
243 info uninstall sqlite3@2.1.5
244 verbose true,C:\NodeWorkbench\AppJS Workspace\template\data\node_modules,C:\NodeWorkbench\AppJS Workspace\template\data\node_modules unbuild sqlite3@2.1.5
245 info postuninstall sqlite3@2.1.5
246 error sqlite3@2.1.5 install: `node-gyp rebuild`
246 error `cmd "/c" "node-gyp rebuild"` failed with 1
247 error Failed at the sqlite3@2.1.5 install script.
247 error This is most likely a problem with the sqlite3 package,
247 error not with npm itself.
247 error Tell the author that this fails on your system:
247 error     node-gyp rebuild
247 error You can get their info via:
247 error     npm owner ls sqlite3
247 error There is likely additional logging output above.
248 error System Windows_NT 6.1.7600
249 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "sqlite3"
250 error cwd C:\NodeWorkbench\AppJS Workspace\template\data
251 error node -v v0.8.14
252 error npm -v 1.1.65
253 error code ELIFECYCLE
254 verbose exit [ 1, true ]

我安装了node-gyp,以及python(我相信是3.3)。谢谢您的帮助。我真的需要尽快解决这个问题,所以如果你能给我指出一个方向,我将不胜感激!

理想情况下,我想在我的项目中使用 Nano 和 couchdb。从前到后的 JSON 会很棒。但是nano在运行时抛出C++异常,所以我必须重新编译堆栈并重新开始(当我安装nano时它重新编译了AppJS,我假设它放入了一些错误的扩展并搞乱了整个工作)我的堆栈如下:

数据库 > AppJS(NodeJS 包含在其中)> SocketIO > AngularJS

这个项目的重点是组装一个堆栈,我可以用它来替代 server2go。我的公司在 server2go 方面遇到了严重的稳定性问题,包括数据丢失和数据库损坏(MyISAM 与 MySQL)。

最佳答案

找到了一个很好的解决方案。 Persist 与 AppJS 完美配合,并且具有出色的非阻塞 sqlite3 驱动程序。以防万一其他人想知道

关于sqlite - NodeJS + AppJS + Sqlite3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13521246/

相关文章:

java - 无法从 sqlite 查询中获取选择列 3

node.js - 在 ExpressJS 中创建链接有什么简单的方法吗?

javascript - promise 后的返回值

node.js - docker 。 npm 安装 -> 错误 : getaddrinfo ENOTFOUND

javascript - 运行 npm install 时出错 Error : 404 Not Found: 7zip-bin@~4. 1.0

angularjs - 如何创建新的应用程序项目而不需要一次又一次下载和安装 npm 模块?

oracle - 如何在终端中使用 sqlite3 连接到 Oracle?

c - 从 sqlite 中的 blob 中读取垃圾

Android SQLite 插入行时遇到问题

node.js - NPM 安装 - 忽略错误