webpackbar icon indicating copy to clipboard operation
webpackbar copied to clipboard

Duplicate bars on webpack error

Open TheAlexLichter opened this issue 7 years ago • 8 comments

Version

v3.0.0

Reproduction link

https://github.com/manniL/lichter.io

Steps to reproduce

webpackbar-duplicated-bars

  1. Download latest master version (linked above)
  2. Install deps
  3. Run yarn generate

Happens in WebStorm terminal but also in normal Gnome Terminal. (Running Ubuntu LTS)

What is expected ?

No duplicate Client bar

What is actually happening?

Duplicate bar

This bug report is available on Nuxt community (#c26)

TheAlexLichter avatar Nov 10 '18 11:11 TheAlexLichter

Any update on this issue?

I poked around and found out that if we remove this piece of code, it does not duplicate the progress bars anymore https://github.com/nuxt/webpackbar/blob/93a8f6430eebfe195854190dd4e8ea3b9d85c936/src/reporters/fancy.js#L21-L23

I'm not 100% sure, but since logUpdate.done() is also called in allDone I think its safe to remove it from done.

reinaldoarrosi avatar Dec 11 '18 17:12 reinaldoarrosi

This bug happens only if any warn/errror happens just right before intial render. I'll try to find a workaround...

pi0 avatar Dec 11 '18 18:12 pi0

@pi0 It's been a year.

ghost avatar Dec 23 '19 10:12 ghost

Any update here?

EnjoyChan avatar Mar 03 '20 17:03 EnjoyChan

@EnjoyChan lets wait for another year. Or use friendlyerrorplugin

ghost avatar Mar 03 '20 18:03 ghost

Hey! Before everything, I remind this is an opensource project and Github is a place for contributing to improving together. Any PR for improving consistency is more than welcome (of course with proper repro) :)

The issue with the link above is not reproducible anymore because the cause was an internal warning which is resolved. So if still happening we need a clean repro before moving forward:

image

I kept this issue open primarily to let others share more repros. Handling all cases is almost impossible to predict. I spent hours making it consistent as is now but still could understand it's not covering all cases and there is room for improvement. So please reply with more constructive messages.

Cheers ;)

pi0 avatar Mar 03 '20 18:03 pi0

@pi0 now we know the issue status better. Thanks for explaining. I also coma across this on windows.

ghost avatar Mar 03 '20 19:03 ghost

@pi0 hi, I hope you help me, because I am facing duplicate output issue. In short, I have two webpack compilers, one uses multi-config (server/client), the second uses a separate config (for PWA, i.e. service worker), and is executed accordingly later after first. As a result, I get the following output:

✔ Client
  Compiled successfully in 24.60s

✔ Server
  Compiled successfully in 29.86s


✔ Client
  Compiled successfully in 24.60s

✔ Server
  Compiled successfully in 29.86s

✔ Service Worker
  Compiled successfully in 909.34ms

Although I expect to see the following:

✔ Client
  Compiled successfully in 24.60s

✔ Server
  Compiled successfully in 29.86s

✔ Service Worker
  Compiled successfully in 909.34ms

Is it possible to add an option to remove state from a previous call to WebpackBar? As I understand you are using the global state, which is probably the reason for this behavior.

lex111 avatar Nov 13 '20 11:11 lex111