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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to start on Linux due to better-sqlite3 compiled version mismatch #5

Closed
whphhg opened this issue Feb 5, 2018 · 6 comments
Closed

Comments

@whphhg
Copy link

whphhg commented Feb 5, 2018

First of all, thank you for creating and open sourcing this! I used to love the original game, so this will be an awesome way to play from time to time and see the inner workings as well. 馃

After npm install I removed the comment enabling mainWindow.webContents.openDevTools() in main.js and the issue is (I've tried npm rebuild like it suggested as well):

Uncaught Error: The module '/home/user/OS/OpenSC2K/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 59. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:172:20)
    at Object.Module._extensions..node (module.js:598:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:172:20)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at bindings (/home/user/OS/OpenSC2K/node_modules/bindings/bindings.js:81:44)
    at Object.<anonymous> (/home/user/OS/OpenSC2K/node_modules/better-sqlite3/lib/database.js:4:40)
node v9.5.0
npm v5.6.0
@cursorial
Copy link

cursorial commented Feb 5, 2018

@whphhg Did you try rebuilding/reinstalling the module?

@whphhg
Copy link
Author

whphhg commented Feb 5, 2018

Not the module itself. How do I do that? I ran npm rebuild in the cloned directory.

@cursorial
Copy link

cursorial commented Feb 5, 2018

npm rebuild better-sqlite3

or

npm install better-sqlite3

@whphhg
Copy link
Author

whphhg commented Feb 5, 2018

I've tried the following combinations but no cigar:

  • npm rebuild better-sqlite3 after a clean install
  • installing better-sqlite3 and starting
  • rebuilding the project and the module after installing better-sqlite3

@cdubz
Copy link

cdubz commented Feb 5, 2018

See #4 as well - have you tried rebuilding electron with that command?

@whphhg
Copy link
Author

whphhg commented Feb 5, 2018

Rebuilding right now (just read your issue)! Will let you know in a bit.

Edit: that did the trick. It's alive!

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

No branches or pull requests

3 participants