question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

electron-rebuild failure with sqlite3

See original GitHub issue

Hello all,

Thank you so much for all your hard work on this. I’m sure I will love it once I get it working.

Firstly, housekeeping. I’m using electron 1.7.9 sqlite3 3.1.13 electron-rebuild 1.6.0. macOS Sierra 10.12.6 npm 5.4.2 node 8.7.0

I was just trying to build a simple test-application by following this video and, before that, this video.

I could get neither to work.

Here is the error I got:

$ npm run rebuild

> sqlitetrial2@1.0.0 rebuild /Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2
> electron-rebuild -f -w sqlite3

✖ Rebuild Failed

An unhandled error occurred inside electron-rebuild
action_after_build.target.mk:6: *** missing separator.  Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/Cellar/node/8.7.0/bin/node" "/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/.bin/node-gyp" "rebuild" "--target=1.7.9" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=node_sqlite3" "--module_path=/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/sqlite3/lib/binding/electron-v1.7-darwin-x64" "--host=https://mapbox-node-binary.s3.amazonaws.com" "--remote_path=./{name}/v3.1.13/{toolset}/" "--package_name=electron-v1.7-darwin-x64.tar.gz"
gyp ERR! cwd /Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/sqlite3
gyp ERR! node -v v8.7.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

Failed with exit code: 1

Error: action_after_build.target.mk:6: *** missing separator.  Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/Cellar/node/8.7.0/bin/node" "/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/.bin/node-gyp" "rebuild" "--target=1.7.9" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=node_sqlite3" "--module_path=/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/sqlite3/lib/binding/electron-v1.7-darwin-x64" "--host=https://mapbox-node-binary.s3.amazonaws.com" "--remote_path=./{name}/v3.1.13/{toolset}/" "--package_name=electron-v1.7-darwin-x64.tar.gz"
gyp ERR! cwd /Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/sqlite3
gyp ERR! node -v v8.7.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

Failed with exit code: 1
    at SafeSubscriber._error (/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/spawn-rx/lib/src/index.js:277:84)
    at SafeSubscriber.__tryOrUnsub (/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/rxjs/Subscriber.js:238:16)
    at SafeSubscriber.error (/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/rxjs/Subscriber.js:197:26)
    at Subscriber._error (/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/rxjs/Subscriber.js:128:26)
    at Subscriber.error (/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/rxjs/Subscriber.js:102:18)
    at MapSubscriber.Subscriber._error (/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/rxjs/Subscriber.js:128:26)
    at MapSubscriber.Subscriber.error (/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/rxjs/Subscriber.js:102:18)
    at SafeSubscriber._next (/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/spawn-rx/lib/src/index.js:251:65)
    at SafeSubscriber.__tryOrUnsub (/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/rxjs/Subscriber.js:238:16)
    at SafeSubscriber.next (/Users/<name>/Documents/#Coding/InlandNewsRecorder/Electron/SQLiteTrial2/node_modules/rxjs/Subscriber.js:185:22)
npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! sqlitetrial2@1.0.0 rebuild: `electron-rebuild -f -w sqlite3`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the sqlitetrial2@1.0.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/<name>/.npm/_logs/2017-10-19T04_25_41_870Z-debug.log

Any ideas? I followed both videos exactly as instructed and ran into issues for each. I’m lost!

Thank you so much for your help.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:21

github_iconTop GitHub Comments

17reactions
NikunjChotaliyacommented, Feb 4, 2018

@trogers1 you need to install all dependency for sqlite3, like visual studio, python etc. or you can install it by single npm command ,just try it npm install -g windows-build-tools it will install all dependency for in windows.

then build sqlite3 with electron-rebuild. put this command to script in your package.json. “rebuild”: “electron-rebuild -f -w sqlite3”

Let me know if you have any issue.

6reactions
coconutboxcommented, Sep 24, 2018

Same to me! windows 10 npm v6.4.1 sqlite3 v4.0.0.2 electron v3.0.0 electron-rebuild v1.8.2

i have node_modules/sqlite3/lib/binding/node-v64-win32-x64/node_sqlite3.node, but need node_modules/sqlite3/lib/binding/electron-v3.0-win32-x64/node_sqlite3.node

Read more comments on GitHub >

github_iconTop Results From Across the Web

electron-rebuild failure with sqlite3 · Issue #204 - GitHub
I'm using electron 1.7.9 sqlite3 3.1.13 electron-rebuild 1.6.0. ... -f -w sqlite3 ✖ Rebuild Failed An unhandled error occurred inside ...
Read more >
app threw an error during load after installing sqlite3 (electronjs)
Several SO answers say to run "rebuild": "electron-rebuild -f -w sqlite3" after sqlite3 installation, doing this returns the following error ...
Read more >
node_modules/sqlite3 · master · Dr.Pirmann / CI101Week56Lab
Running sqlite3 through electron-rebuild does not preserve the sqlcipher extension, so some additional flags are needed to make this build Electron ...
Read more >
Need help getting SQLite working with Electron on Windows 10
I have been trying for weeks to get SQLite installed and working with Electron. I am on windows 10 and here is my...
Read more >
[Fixed]-Error at rebuild SQLite3 for a Electron app
I am trying to install sqlite3 to make an app in Electron over Windows. I put in my package.json: "rebuild": "electron-rebuild -f -w...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found