docusaurus: When using @docusaurus/faster, if there is some Chinese in the md file when packaging on version 3.6, an error message will be displayed, such as byte index 4 is not a char boundary.
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I’m using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
● Client ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ (83%) sealing chunk ids
Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues
Message: byte index 4 is not a char boundary; it is inside ‘点’ (bytes 3…6) of 站点建设-7-fa-065
Location: crates\rspack_core\src\utils\compile_boolean_matcher.rs:325
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1: napi_register_module_v1 at <unknown source file> 2: napi_register_module_v1 at <unknown source file> 3: napi_register_module_v1 at <unknown source file> 4: napi_register_module_v1 at <unknown source file> 5: wasmer_vm_f64_nearest at <unknown source file> 6: wasmer_vm_f64_nearest at <unknown source file> 7: napi_register_module_v1 at <unknown source file> 8: napi_register_module_v1 at <unknown source file> 9: napi_register_module_v1 at <unknown source file> 10: napi_register_module_v1 at <unknown source file> 11: napi_register_module_v1 at <unknown source file> 12: napi_register_module_v1 at <unknown source file> 13: napi_register_module_v1 at <unknown source file> 14: napi_register_module_v1 at <unknown source file> 15: napi_register_module_v1 at <unknown source file> 16: napi_register_module_v1 at <unknown source file> 17: napi_register_module_v1 at <unknown source file> 18: napi_register_module_v1 at <unknown source file> 19: napi_register_module_v1 at <unknown source file> 20: napi_register_module_v1 at <unknown source file> 21: napi_register_module_v1 at <unknown source file> 22: napi_register_module_v1 at <unknown source file> 23: napi_register_module_v1 at <unknown source file> 24: napi_register_module_v1 at <unknown source file> 25: napi_register_module_v1 at <unknown source file> 26: napi_register_module_v1 at <unknown source file> 27: wasmer_vm_f64_nearest at <unknown source file> 28: napi_register_module_v1 at <unknown source file> 29: napi_register_module_v1 at <unknown source file> 30: napi_register_module_v1 at <unknown source file> 31: BaseThreadInitThunk at <unknown source file> 32: RtlUserThreadStart at <unknown source file> error Command failed with exit code 3221226505.
Reproducible demo
No response
Steps to reproduce
1.upgrade to 3.6.0
2.copy these to docusaurus.config.ts :
future: {
experimental_faster: {
swcJsLoader: true,
swcJsMinimizer: true,
swcHtmlMinimizer: true,
lightningCssMinimizer: true,
rspackBundler: true,
mdxCrossCompilerCache: true,
},
},
3.start or build
4.error happened
Expected behavior
package correctly and then start.
Actual behavior
I suspect there is a problem with the byte compilation of Chinese when packaging.
Your environment
- Public source code:https://github.com/EaveLuo/eave-web
- Public site URL:eaveluo.com
- Docusaurus version used:3.6.0
- Environment name and version (e.g. Chrome 89, Node.js 16.4):Edge Latest, Node.js 20.12.2
- Operating system and version (e.g. Ubuntu 20.04.2 LTS):windows10
Self-service
- I’d be willing to fix this bug myself.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 23 (2 by maintainers)
thanks for reporting, we will take a look ASAP
@slorber sorry for late reply
incremental flags is still in early experimental stage, we may consider enable it by default for rspress users first when we think it’s stable enough, and when it’s stable in rspress and then progressively enable it by default in rsbuild and rspress. we don’t have stats how many users encounter this bug compared to users enable it cause we don’t do telemetry in rspack now.
incremental: undefinedis published in v3.6.3: https://github.com/facebook/docusaurus/releases/tag/v3.6.3@slorber I tried your suggestion above.
undefinedappears to work for me. FWIW,falsealso worksAlso updating RSPack seemed to fix this as referenced above:
pnpm update @rspack/coreEDIT: I’m being told by devs it’s still not fixed. So it works sometimes now, but not all
it shouldn’t have anything to do with Chinese anymore, but rather with rspack.