docusaurus icon indicating copy to clipboard operation
docusaurus copied to clipboard

Build prints progress bar twice

Open hslee2008 opened this issue 3 years ago • 4 comments
trafficstars

Have you read the Contributing Guidelines on issues?

Prerequisites

  • [X] I'm using the latest version of Docusaurus.
  • [X] I have tried the npm run clear or yarn clear command.
  • [X] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • [X] I have tried creating a repro with https://new.docusaurus.io.
  • [X] I have read the console error message carefully (if applicable).

Description

Not sure if I am the only one experiencing this bug, but docusaurus seems to be building client/server/sw two times in i18n.

I am not sure whether docusaurus is printing these messages twice or building them twice.

This is what happend.

Note: the default language is ko with en

KO

ko

en

en

Reproducible demo

https://github.com/HyunseungLee-Travis/Coding-Insight

Steps to reproduce

  1. Clone https://github.com/HyunseungLee-Travis/Coding-Insight
  2. Go to the directory
  3. Run yarn build or npm run build

Expected behavior

The packages should only build once or print that it is only being built once.

Actual behavior

The client/server is built twice or is printed out like that.

Your environment

  • Public source code: https://github.com/HyunseungLee-Travis/Coding-Insight
  • Docusaurus version used: ^2.0.0-rc.1 (but have existed always)
  • Environment name and version: Node.js v16.16.0
  • Operating system and version: Windows 11

Self-service

  • [ ] I'd be willing to fix this bug myself.

hslee2008 avatar Jul 18 '22 07:07 hslee2008

I have seen this as well—it's also observable when you try to build our own site.

AFAICT, the second progress bar goes super fast, so it's unlikely that it re-builds—likely just logs again.

Does it cause tangible issues? Or is it just being annoying?

Josh-Cena avatar Jul 18 '22 07:07 Josh-Cena

It is annoying and would be better if the docusaurus team and the rest of the community fix it.

hslee2008 avatar Jul 18 '22 08:07 hslee2008

I see—it would be super hard to investigate because I don't even know what's triggering the progress bar, but I'll gladly review someone's PR for this

Josh-Cena avatar Jul 18 '22 08:07 Josh-Cena

Also seen this and not sure how to fix it

I don't even know what's triggering the progress bar,

We are using webpackbar Webpack plugin, maybe it has a bug that happens in our case when you build 2 configs at once 🤷‍♂️

slorber avatar Jul 20 '22 10:07 slorber