Spire tab crashes with "getAllGuardianFloors is not defined" ReferenceError #249
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?
Steps to reproduce:
Expected: Spire summary tab loads showing floor progress, guardian roster, etc.
Actual: Tab shows "spire tab failed to load" and console shows:
Root cause: The
SpireSummaryTab.helpers.tsxfile importsgetAllGuardianFloorsfrom@/lib/game/data/guardian-encountersand calls it at module level (line 8:const GUARDIAN_FLOORS = getAllGuardianFloors()). The function IS properly exported fromguardian-encounters.ts(line 375), but at runtime it'sundefined. This appears to be a build/bundling issue where the function is not properly included in the production chunk.Affected files:
src/components/game/tabs/SpireSummaryTab.helpers.tsx(line 6, 8)src/components/game/tabs/SpireSummaryTab.tsx(line 98-99)Store:
useCombatStore/usePrestigeStore(SpireSummaryTab reads from both)Starting investigation. Reading SpireSummaryTab.helpers.tsx and guardian-encounters.ts to trace the import/export issue.
Fixed: Added missing
getAllGuardianFloorsimport toSpireSummaryTab.tsxline 7. The function was used inuseMemocalls (lines 98-99) but never imported — onlygetGuardianForFloorwas imported. AddedgetAllGuardianFloorsto the existing import from@/lib/game/data/guardian-encounters. All 12 SpireSummaryTab tests pass.