You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to #400 our build outputs are always verbose now. we use the node api like this.
import rebuild from 'electron-rebuild';
rebuild({
...
})
I tried few things but can't suppress the node-gyp output. I tried setting the log-level to silent through npm env vars, it helps a little but still bunch of logs are printed out.
Any way to make rebuilds quiet? I made sure process.env.DEBUG is not set.
Reacted by Marcus Pohorely, Vadim Demedes, Sesh Sadasivam and Tony
@mmaietta Thanks for this patch, like you said it doesn't actually fix the issue, but it reduces the verbosity a little bit.
It also makes more sense than using process.env.DEBUG directly. currently electron-rebuild will be set to verbose even if I try to debug other libraries. export DEBUG=babel for example.
I suggest you turn your patch into a pull request :)
You're probably not using the latest version of electron-rebuild. Electron Forge v6 beta 60 will have this latest version by default but I don't have a timeline for when that will be released.
yes, this is happening because of node-gyp here node gyp sets the stdio for the childProcess to be inherit=[0, 1, 2] on silent. if I set this to ['ignore', 'ignore', 'ignore'] all output is suppressed. not sure how to approach this as a fix.
yes, this is happening because of node-gyp here node gyp sets the stdio for the childProcess to be inherit=[0, 1, 2] on silent. if I set this to ['ignore', 'ignore', 'ignore'] all output is suppressed. not sure how to approach this as a fix.
This sounds like something that needs to be fixed in node-gyp.
Activity
mmaietta commentedon Apr 19, 2021
I created this patch for electron-rebuild's output (options available: verbose, silent, warn, silly)
electron-rebuild+2.3.5.patchThe downside is that we can't filter the verbosity of
make, which is what I'm understanding to be the main culprit here. Ref: nodejs/node-gyp#532serkanyersen commentedon Apr 20, 2021
@mmaietta Thanks for this patch, like you said it doesn't actually fix the issue, but it reduces the verbosity a little bit.
It also makes more sense than using
process.env.DEBUGdirectly. currently electron-rebuild will be set to verbose even if I try to debug other libraries.export DEBUG=babelfor example.I suggest you turn your patch into a pull request :)
misc: properly check for debug mode for node-gyp loglevel
chore: properly check for debug mode for node-gyp loglevel
fix: only set --verbose for node-gyp if DEBUG for rebuild is set
fix: only set --verbose for node-gyp if DEBUG for rebuild is set
fix: only set --verbose for node-gyp if DEBUG for rebuild is set
electron-bot commentedon Aug 27, 2021
🎉 This issue has been resolved in version 3.2.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
serkanyersen commentedon Aug 27, 2021
@malept Thanks for merging and releasing this fix 🎉
However, this fix only helps a little bit, actual problem is still there. Webpack build output is still showing lines like this.
and there is no way to suppress that output. Should we re-open this issue until a solution is found?
malept commentedon Aug 27, 2021
You're probably not using the latest version of
electron-rebuild. Electron Forge v6 beta 60 will have this latest version by default but I don't have a timeline for when that will be released.serkanyersen commentedon Aug 27, 2021
we are using
electron-rebuilddirectly and I upgraded tov3.2.1(confirmed in yarn.lock, no other version is there)Here is how it's used in our code
it's possible that we are doing something wrong of course.
serkanyersen commentedon Aug 27, 2021
I was just checking how
node-gypis used, I noticed thishttps://github.com/electron/electron-rebuild/blob/master/src/module-type/node-gyp.ts#L27 this line uses
--quietbut it needs to be--silentAfter that change, output is reduced to this
I'm investigating where these additional lines are coming from, it could be a bug with
node-gypit seems to me that it's not respecting--silentflag.serkanyersen commentedon Aug 27, 2021
yes, this is happening because of
node-gyphere node gyp sets thestdiofor the childProcess to beinherit=[0, 1, 2]on silent. if I set this to['ignore', 'ignore', 'ignore']all output is suppressed. not sure how to approach this as a fix.malept commentedon Aug 27, 2021
Thanks, I've fixed that in #837.
This sounds like something that needs to be fixed in node-gyp.
serkanyersen commentedon Aug 27, 2021
Thanks for prompt reply @malept. I've created local patches for these and will create an issue on node-gyp at one point.