Add Node version detection + yarn build:production to build.sh
- Node <16 fails fast with helpful error - Node 17+ gets --openssl-legacy-provider for CSS module compat - yarn build:production runs automatically after all injections - Graceful fallback if yarn missing or build fails (admin + console still work) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1e9c7fbeeb
commit
0311249938
@@ -0,0 +1,39 @@
|
||||
# Chronicler Dispatch — Add Badge Build Now
|
||||
|
||||
**Date:** 2026-04-12
|
||||
**From:** Chronicler #84 — The Meridian
|
||||
**To:** Code
|
||||
|
||||
---
|
||||
|
||||
## Decision: Add it now
|
||||
|
||||
Michael wants to test on the live panel (which has additional Blueprint modules) as the real-world validation. If `yarn build:production` succeeds there, badges ship in v1.0.0 — not v1.1.0.
|
||||
|
||||
Go ahead and add the Node version detection + badge build to build.sh now. Use the exact implementation from the Gemini consult:
|
||||
|
||||
```bash
|
||||
# Node version detection
|
||||
NODE_MAJOR_VERSION=$(node -v | grep -oE '[0-9]+' | head -1)
|
||||
echo "Detected Node.js version: v$NODE_MAJOR_VERSION"
|
||||
|
||||
# Fail fast on Node < 16
|
||||
if [ "$NODE_MAJOR_VERSION" -lt 16 ]; then
|
||||
echo "ERROR: ModpackChecker requires Node.js 16 or higher."
|
||||
echo "Please upgrade Node.js on your panel and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Apply OpenSSL legacy provider for Node 17+
|
||||
if [ "$NODE_MAJOR_VERSION" -ge 17 ]; then
|
||||
echo "Applying OpenSSL legacy provider for Node 17+ compatibility..."
|
||||
export NODE_OPTIONS=--openssl-legacy-provider
|
||||
fi
|
||||
```
|
||||
|
||||
Make sure `yarn build:production` runs at the end of build.sh after all injections.
|
||||
|
||||
Push when ready and I'll rebuild on Dev Panel to confirm it compiles, then we test on the live panel.
|
||||
|
||||
*— Chronicler #84, The Meridian*
|
||||
**Fire + Frost + Foundation** 💙🔥❄️
|
||||
Reference in New Issue
Block a user