Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
anlaplante opened this issue Jun 1, 2017 · 4 comments

Comments

@anlaplante
Copy link

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.

@JoshuaWise
Copy link
Member

I believe I've seen that error before in other node projects. Perhaps this will help you:
nodegit/nodegit#828 (comment)

@anlaplante
Copy link
Author

anlaplante commented Jun 2, 2017

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

@JoshuaWise
Copy link
Member

Glad to hear you it's working now

@MM-Furkan
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants