Better-sqlite3: Electron - Error: A dynamic link library (DLL) initialization routine failed.

Created on 1 Jun 2017  路  4Comments  路  Source: JoshuaWise/better-sqlite3

Hi,
I installed better-sqlite3 without any issue.

But on : var Database = require('better-sqlite3') I have this error

Exception has occurred: Error
Error: A dynamic link library (DLL) initialization routine failed.
\?\d:\Users\Antoine\Documents\Visual Studio 2017\Projects\electronSqlitenode_modules\better-sqlite3\build\Release\better_sqlite3.node
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
at Object.Module._extensions..node (module.js:598:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at bindings (d:\Users\Antoine\Documents\Visual Studio 2017\Projects\electronSqlitenode_modules\bindings\bindings.js:76:44)
at Object. (d:\Users\Antoine\Documents\Visual Studio 2017\Projects\electronSqlitenode_modules\better-sqlite3lib\database.js:5:38)

Windows 10
Node 6.9.2
Electron 1.6.10
Npm 3.10.9
Better-sqlite3 2.3.3

I have another project with node-sqlite that works well.

Thanks.

help wanted

Most helpful comment

I finally did this node_modules/.bin/electron-rebuild -f -w better-sqlite3 and it solved this issue.
Thanks for your concern.

All 4 comments

I believe I've seen that error before in other node projects. Perhaps this will help you:
https://github.com/nodegit/nodegit/issues/828#issuecomment-217380023

I finally did this node_modules/.bin/electron-rebuild -f -w better-sqlite3 and it solved this issue.
Thanks for your concern.

Glad to hear you it's working now

@anlaplante can you tell me what actually you did node_modules/.bin/electron-rebuild -f -w better-sqlite3 with this i still have same error

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pke picture pke  路  3Comments

johnelliott picture johnelliott  路  6Comments

faac-spazio-italia picture faac-spazio-italia  路  5Comments

imtbl picture imtbl  路  6Comments

eslachance picture eslachance  路  3Comments