Commit fb8c3aa
committed
Fix: Align Docusaurus plugin versions & prevent Vercel memory crash
This PR updates dependencies and build configuration to resolve Vercel build errors caused by an invalid Docusaurus plugin version name and potential memory allocation issues.
Changes Made
Dependency Fixes
Updated all @docusaurus/* packages to 3.8.1 to ensure version consistency and avoid mismatched plugin issues.
Specifically fixed @docusaurus/plugin-content-docs version to 3.8.1 (previously caused Invalid name error during build).
Memory Optimization
Added cross-env package for cross-platform environment variable support.
Modified build script to increase Node.js heap size:
bash
Copy code
"build": "cross-env NODE_OPTIONS=${NODE_OPTIONS:---max_old_space_size=4096} docusaurus build"
This helps prevent memory crashes on Vercel during large builds.
Related Issue(s)
Vercel build log error:
typescript
Copy code
Error: Invalid name=docusaurus-plugin-content-docs version number=3.7.0
Potential "JavaScript heap out of memory" crash during build.
Testing
✅ Local build confirmed with npm run build (no errors).
✅ Deployment works on both local and Vercel environments after changes.
Checklist
Updated dependencies to stable versions
Ensured all Docusaurus packages are on the same version
Prevented memory crash by increasing heap size
Confirmed build passes locally and on Vercel1 parent 5d82707 commit fb8c3aa
1 file changed
+11
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
60 | | - | |
| 60 | + | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
0 commit comments