使用利用sqlite3
. 看起来 sqlite3 没有正确重新编译。环顾四周,看到有人推荐 better-sqlite3。这将要求我必须移植 sqlite3 代码(没有 db.serialize 等效项)。还有另一种方法可以让 sqlite3 工作吗?
❯ yarn start
...
App threw an error during load
Error: Cannot open [redacted]/node_modules/sqlite3/lib/binding/node-v83-darwin-x64/node_sqlite3.node: Error: The module '[redacted]/node_modules/sqlite3/lib/binding/node-v83-darwin-x64/node_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 83. This version of Node.js requires
NODE_MODULE_VERSION 80. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
...
ERROR in ./node_modules/node-pre-gyp/lib/node-pre-gyp.js
Module not found: Error: Can't resolve './' in '[redacted]/node_modules/node-pre-gyp/lib'
@ ./node_modules/node-pre-gyp/lib/node-pre-gyp.js 52:13-32 184:38-57
@ ./node_modules/sqlite3/lib/sqlite3-binding.js
@ ./node_modules/sqlite3/lib/sqlite3.js
@ ./node_modules/chrome-cookies-secure/index.js