Fixes production error where dynamic imports of @svg-maps/world and @svg-maps/usa
packages fail with "Unexpected token 'export'" error.
**Root cause:**
- The @svg-maps packages use ES module syntax (`export default {...}`) in index.js
- Node.js 18 cannot load these files via dynamic import() without "type": "module"
- Node.js 20 has improved ES module support and handles this correctly
**Changes:**
- Dockerfile: FROM node:18-alpine → FROM node:20-alpine
- deploy.yml: node-version "18" → "20"
**Testing:**
- ✅ Local dev server with Node 20: works (dynamic imports succeed)
- ✅ Production container with Node 18: fails (dynamic imports fail)
- ✅ Tested: `node -e "import('@svg-maps/world').then(...)"` succeeds on Node 20
This fix ensures the Socket.IO server can successfully process START_GAME moves
by loading map data via dynamic imports in the Validator.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| deploy-storybook.yml | ||
| deploy.yml | ||
| publish-abacus-react.yml | ||
| release.yml | ||
| templates-test.yml | ||
| update-abacus-examples.yml | ||
| update-template-examples.yml | ||
| verify-examples.yml | ||