[Critical] [Bug] Release build fails — missing calcMeleeDamage export in utils/index.ts barrel #264
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The production build (
next build) fails with a Turbopack error:Root Cause
combat-actions.tsline 11 importscalcMeleeDamagefrom'../utils'(the barrelutils/index.ts), butcalcMeleeDamageis not re-exported in that barrel file.src/lib/game/utils/combat-utils.ts(line 297) —export function calcMeleeDamage(...)✅src/lib/game/stores/combat-actions.ts(line 11) — from'../utils'✅src/lib/game/utils/index.ts—calcMeleeDamageis missing ❌The barrel file exports
calcDamageand other functions fromcombat-utils.tsbut omitscalcMeleeDamage.Introduced By
Commit
8dde423— "feat: implement sword/melee auto-attack system (spec §3.1, §4.3)" added the function and its usage but forgot to update the barrel export.Impact
master.next dev) may not catch this because dev mode uses lazy compilation and the code path may not be hit until the combat tick runs with an equipped sword.8dde423have produced broken images.Fix Required
Add
calcMeleeDamageto the re-export block insrc/lib/game/utils/index.tsthat exports from./combat-utils.Files Involved
src/lib/game/utils/index.tssrc/lib/game/utils/combat-utils.tssrc/lib/game/stores/combat-actions.tsFixed. Added
calcMeleeDamageto the./combat-utilsre-export block insrc/lib/game/utils/index.ts.Verified:
next buildcompletes successfully (exit 0)69cc8b7