Docker build fails with 3 errors: JSX syntax, missing module, missing file #21
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?
Build Failure Summary
The Docker build (
RUN bun run build) fails with 3 distinct errors:Error 1 — Invalid JSX ternary syntax in
DisciplinesTab.tsx:153File:
src/components/game/tabs/DisciplinesTab.tsxLine: 151–155
Problem: The ternary operator is malformed. The
)closing the.map()is followed by:instead of?. The parser sees)) : (and expects a closing</tag.Fix: Change
)) : (to)) ? null : ((or similar), or restructure the conditional rendering.Error 2 — Missing module
../data/disciplinesindiscipline-effects.ts:6File:
src/lib/game/effects/discipline-effects.tsLine: 6
Problem: There is no file at
src/lib/game/data/disciplines.tsorsrc/lib/game/data/disciplines/index.ts. The directorysrc/lib/game/data/disciplines/contains individual files (base.ts,enchanter.ts,fabricator.ts,invoker.ts) but no barrel/index file that exportsALL_DISCIPLINES.Fix: Create
src/lib/game/data/disciplines/index.tsthat imports from the four discipline files and exports a combinedALL_DISCIPLINESarray.Error 3 — Missing file
./tabs/ActivityLoginActivityLogPanel.tsx:4File:
src/components/game/ActivityLogPanel.tsxLine: 4
Problem: The directory
src/components/game/tabs/contains onlyDisciplinesTab.tsxandindex.ts— there is noActivityLog.tsxfile anywhere in the project.Fix: Either create the missing
ActivityLog.tsxcomponent, or updateActivityLogPanel.tsxto import from the correct location (if the component exists elsewhere under a different name/path).Files needing changes
src/components/game/tabs/DisciplinesTab.tsx— fix JSX ternary on line 153src/lib/game/data/disciplines/index.ts— create new file withALL_DISCIPLINESexportsrc/components/game/ActivityLogPanel.tsx— fix import path or create missingActivityLog.tsxStarting work on fixing the 3 Docker build errors. Will investigate and fix all three issues.
All 3 Docker build errors fixed and verified with successful
bun run build:DisciplinesTab.tsx JSX ternary — Fixed malformed
)) : (to proper ternaryunlockedPerks && unlockedPerks.length > 0 ? (...) : (...). Also fixed broken relative imports (../data/disciplines/base→@/lib/game/data/disciplines/base) and converted default imports to named imports matching the actualexport constdeclarations.Missing disciplines barrel — Created
src/lib/game/data/disciplines/index.tsthat imports from all four discipline files and exportsALL_DISCIPLINESarray.Missing ActivityLog component — Created
src/components/game/tabs/ActivityLog.tsxthat acceptsactivityLogandmaxEntriesprops and renders the activity log entries.Also fixed a secondary parse error: the
onClickarrow function with expression body containingconsole.log(\Switch to ${tab.label}`)` was failing Turbopack parsing — changed to block body with braces.Build: ✅ Compiled successfully. All pre-commit checks passed.