better-sqlite3 icon indicating copy to clipboard operation
better-sqlite3 copied to clipboard

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

Open anlaplante opened this issue 9 years ago • 4 comments

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\electronSqlite\node_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\electronSqlite\node_modules\bindings\bindings.js:76:44) at Object. (d:\Users\Antoine\Documents\Visual Studio 2017\Projects\electronSqlite\node_modules\better-sqlite3\lib\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.

anlaplante avatar Jun 01 '17 08:06 anlaplante

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

JoshuaWise avatar Jun 01 '17 16:06 JoshuaWise

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

anlaplante avatar Jun 02 '17 06:06 anlaplante

Glad to hear you it's working now

JoshuaWise avatar Jun 02 '17 12:06 JoshuaWise

@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

MM-Furkan avatar Dec 14 '18 06:12 MM-Furkan