Open slorber opened 6 months ago
Is this still an issue? I opened the project and it seems to be building fine. I know we had issues in the past with the encoding, but we fixed that. Maybe we did miss something though.
I'll look into it tomorrow.
Not sure why but yarn install became much slower recently on https://docusaurus.new/stackblitz-ts
It hangs forever on this step:
Running yarn build
on the provided repro still gives me this error:
Now I'm not sure what's causing that problem exactly, this sandbox has been provided by someone as a bug report. I'm unable to get that error again if I try to create a more minimal repro.
Note that it happens at the end of the webpack build, and in former versions of Docusaurus we used to run the SSG phase as a webpack plugin at the end of the build. Now we moved SSG as a separate step that comes after the webpack build, that might explain why I can't reproduce anymore.
In that former version, we had a Webpack plugin do the SSG phase using a Node vm.Script
(through https://github.com/pierrec/node-eval), maybe that specific combination caused troubles? π€·ββοΈ
Oh I see. Thanks for the additional information. It could be that it's because of the vm.Script
. We don't support all features as it's very trick to get right and to get everything working as it should.
yarn install
does feel pretty slow indeed. This might be related to a change we made not too long ago. I'll see if I can investigate this but can't promise anything in regards to timing.
@slorber Just wanted to let you know that we prioritized the slow yarn install
issue and I'm actively working on resolving that. Will keep you posted.
Thanks @SamVerschueren !
Regarding the other sb_expose
error, it might be vm.Script
as well be due to using webpack stats. I've always thought it a bit hard to reason about, and sometimes it's difficult to figure out how to print full stack traces from Webpack errors.
Description of Bug
Trying to build a docusaurus site with errors leads the error message being printed badly.
Note: we use TC39 Error cause, this might be the reason?
Steps to Reproduce
Go to https://stackblitz.com/edit/github-ikeyac?file=docs%2Ftutorial-basics%2Fmarkdown-features.mdx
Run
yarn build
See weird error message displayed in StackBlitz:
Expected Behavior
The correct error message when running outside StackBlitz:
The error cause is appropriately printed, and display useful information to troubleshot the problem.
Additional Context/Questions
StackBlitz is useful for Docusaurus users to provide reproduction cases, and also for me as a maintainer to not have to run repro code locally for security.
Seeing obfuscated errors unfortunately forces me to run the code outside StackBlitz to be able to see the good expected error message.
Otherwise, Docusaurus keeps building fine in StackBlitz π