Yuri Nko
Yuri Nko

Reputation: 71

npm install creating files at wrong directory for electron

When I install sqlite3by npm in directory of electron project, it creates

c:\testing\Elektron\node_modules\sqlite3\lib\binding\node-v57-win32-x64

but electron aplication throw following error:

Error: Cannot find module 'c:\testing\Elektron\node_modules\sqlite3\lib\binding\electron-v1.6-win32-x64\node_sqlite3.node'

I tried to rename the directory, but it lead to

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

Here is the pastebing of all commands and actions I did

I don't need work arounds, I need to build aplication later into an executable file, so I appreciate your answer.

Upvotes: 1

Views: 78

Answers (1)

Yuri Nko
Yuri Nko

Reputation: 71

electron-rebuild

is needed for native modules.

Upvotes: 1

Related Questions