14
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

electron でsqlite3を使うときに起こるエラー

Posted at
a missing path of something like node_modules/sqlite3/lib/binding/node-v43-darwin-x64

エラーが起こる原因

electron で探しに行っているsqlite3のpathと実際にinstallしているsqliteのパスが異なっているために起こる。

詳細

sqliteの更新が遅れているために古いnodeのpathをそのままにされている
 node_modules/sqlite3/lib/binding/node-v14-darwin-x64

解決策

npm run prepublish
node-gyp configure --module_name=node_sqlite3 --module_path=../lib/binding/node-v43-darwin-x64
node-gyp rebuild --target=0.27.1 --arch=x64 --target_platform=darwin --dist-url=https://atom.io/download/atom-shell --module_name=node_sqlite3 --module_path=../lib/binding/node-v43-darwin-x64

ここで一つ注意するべきことはtargetのelectronのversionとnode-v43の所は自分の環境に応じて変更する必要がある。

参考文献

14
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?