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.
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.
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
Most helpful comment
I finally did this
node_modules/.bin/electron-rebuild -f -w better-sqlite3and it solved this issue.Thanks for your concern.