rebuild icon indicating copy to clipboard operation
rebuild copied to clipboard

Running from terminal vs npm-script

Open zewa666 opened this issue 7 years ago • 5 comments

I'm using electron-rebuild to rebuild the nodegit dependency for Electron v3. If i do it via the cmd using this statement ./node_modules/.bin/electron-rebuild -f -w nodegit all works great. But if I try to add an npm script like this in my package.json "rebuild-electron-deps": "electron-rebuild -f -w nodegit" it does the recompilation process as well and also properly succeeds, but the app crashes on using the dependency, which hints the compilation wasn't successful. Any ideas what the difference could be?

zewa666 avatar Nov 22 '18 13:11 zewa666

Just a quick guess, try such npm script electron-rebuild -- -f -w nodegit.

vladimiry avatar Dec 22 '18 16:12 vladimiry

Thx for the tip will give it a try after the holidays

zewa666 avatar Dec 22 '18 16:12 zewa666

I've tried already, it's not going to work.

I actually just faced the same issue. It works differently if I run electron-rebuild as npm script and as direct console call (ie /node_modules/.bin/electron-rebuild or node ./node_modules/electron-rebuild/lib/src/cli.js).

vladimiry avatar Dec 22 '18 20:12 vladimiry

Thats sad, I really thought the missing double-dash was the issue. Thats currently the only thing holding me back from an upgrade to Electron 3 in my app :(

zewa666 avatar Dec 23 '18 07:12 zewa666

I'm now randomly pinging @MarshallOfSound and @paulcbetts for help as one of the top contributors ;) Do you guys maybe have an idea what could cause this issue?

zewa666 avatar Jan 07 '19 06:01 zewa666