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.

always verbose output.

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
maleptcommented, Aug 27, 2021

this line uses --quiet but it needs to be --silent

Thanks, I’ve fixed that in #837.

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.

1reaction
mmaiettacommented, Apr 19, 2021

I created this patch for electron-rebuild’s output (options available: verbose, silent, warn, silly) electron-rebuild+2.3.5.patch

diff --git a/node_modules/electron-rebuild/lib/src/module-rebuilder.js b/node_modules/electron-rebuild/lib/src/module-rebuilder.js
index 73ddba1..5f3f7c3 100644
--- a/node_modules/electron-rebuild/lib/src/module-rebuilder.js
+++ b/node_modules/electron-rebuild/lib/src/module-rebuilder.js
@@ -70,9 +70,7 @@ class ModuleRebuilder {
             `--dist-url=${this.rebuilder.headerURL}`,
             '--build-from-source'
         ];
-        if (process.env.DEBUG) {
-            args.push('--verbose');
-        }
+        args.push(`--loglevel=${debug.enabled('electron-rebuild') ? 'verbose' : 'silent'}`)
         if (this.rebuilder.debug) {
             args.push('--debug');
         }

The downside is that we can’t filter the verbosity of make, which is what I’m understanding to be the main culprit here. Ref: https://github.com/nodejs/node-gyp/issues/532

Read more comments on GitHub >

github_iconTop Results From Across the Web

Verbose mode: Mac guide - Setapp
For your Mac to always booting in verbose mode: In Finder, clшck Go > Applications > Utilities > Terminal; Type the following command:...
Read more >
How to boot your Mac in verbose mode - MacPaw
You can use Terminal to set your Mac up so that it always boots in verbose mode without you having to press Command+V....
Read more >
What Is Verbose Mode and How to Boot Your Mac in Verbose ...
Verbose Mode is a booting mode on Macintosh computers that replaces the graphical startup screen with a series of command lines. Those specified ......
Read more >
How to Always Boot Mac OS X in Verbose Mode - OSXDaily
How to Turn On Always Verbose Booting for Mac OS X. Simply execute the following nvram command at the Terminal to enable verbose...
Read more >
always verbose output. · Issue #594 · electron/rebuild - GitHub
After upgrading to #400 our build outputs are always verbose now. we use the node api like this. import rebuild from 'electron-rebuild'; ...
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