electron / electron/rebuild

Module build fails with empty binding.gyp

Open
#1,127 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.1k
Forks
181
Avg merge
6h 44m
Merged PRs (30d)
3

Description

Hello, I'm trying to use audify (https://github.com/almoghamdani/audify) in an electron app with electron-forge.

When the electron-rebuild step runs it tries to rebuild audify build fails with the error at the end.

The module actually uses cmake-js to build and builds fine if build using npm run rebuild. It actually worked fine with electron-rebuild at some point but something updated and it doesn't work anymore. not sure if the issue is in electron-rebuild or node-gyp.

```
\ Building module: audify, Completed: 0gyp: Unable to find targets in build file binding.gyp while trying to load binding.gyp
Error: `gyp` failed with exit code: 1
at ChildProcess.onCpExit (C:\code\wiservibe\electron\node_modules\@electron\rebuild\node_modules\node-gyp\lib\configure.js:325:16)
at ChildProcess.emit (node:events:513:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)

× Rebuild Failed

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild 'C:\code\wiservibe\electron\node_modules\audify'

Error: node-gyp failed to rebuild 'C:\code\wiservibe\electron\node_modules\audify'
at ChildProcess. (C:\code\wiservibe\electron\node_modules\@electron\rebuild\lib\module-type\node-gyp\node-gyp.js:118:24)
at ChildProcess.emit (node:events:513:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)

```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the electron-forge electron-rebuild step with audify and compare it with the reported successful npm run rebuild path. Inspect how electron-rebuild invokes node-gyp for the empty binding.gyp versus the module's cmake-js build; done means audify rebuilds successfully without the gyp target error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, electron, node.js
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.