New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vitepress build error #2817
Comments
Please provide a minimal "complete" verifiable example, preferably using https://vitepress.new The information you've provided is not sufficient enough to reproduce the issue at our end. Although, most likely seems to be an issue with your node version. |
the same issue; https://stackblitz.com/edit/vite-p57qkk?file=package.json Works for dev but not for build |
Which browser are you on? StackBlitz doesn't work properly in firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1423593). |
latest vitpress v support node-v > 16.2.0 |
The recommended version is node 18 or higher. It might however work on node 16 as well. But webcontainers (stackblitz) polyfill most of the code but not the Intl.Segmenter API which is available in node 16+ but is not there in firefox. It wasn't being used anywhere in the client code, but since technically node in webcontainers is running in the browser itself, so it was being executed. I have now downgraded that dependency in 877f643. It should work fine on firefox webcontainers from next release. Locally, rc-4 should also work fine. |
Thank you for the update! It's great to hear that the compatibility issue with Firefox and Node.js versions has been addressed by downgrading the dependency. I really appreciate your quick response and effort in making sure Vitepress works smoothly across different environments. Looking forward to the next release! 👍 |
Describe the bug
Execute command npm run docs:build and throw an exception: build error:
TypeError: Intl.Segmenter is not a constructor
Reproduction
.vitepress config.ts
package.json
Expected behavior
npm run build:docs
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: