Most Treasure Hunt problems fall into one of two categories: a file path that does not match what the code expects, or the game being accessed via theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/treasure-hunt-game/llms.txt
Use this file to discover all available pages before exploring further.
file:// protocol instead of a local HTTP server. The fixes are straightforward once you know where to look. Start with browser DevTools before anything else — nearly every issue leaves a visible trace in the Network or Console tab.
Page opens but styling is missing
Page opens but styling is missing
Cause:
assets/css/styles.css is missing, has been moved, or the path in index.html does not match the actual file location.How to confirm: Open the Network tab in DevTools and reload the page. Look for a 404 on styles.css. A 200 that loads zero bytes can also indicate an empty or misplaced file.Fix:-
Confirm the file exists at exactly
assets/css/styles.cssrelative to the repository root. -
Check the
<link>tag inindex.html— it must read: -
If the file was renamed or moved, restore it to
assets/css/styles.cssor update thehrefto match.
Game does not start / board is empty
Game does not start / board is empty
Cause:
app.js is not loading as an ES module, or the browser is blocking the module import because the page is being opened via the file:// protocol instead of http://.How to confirm: Open the Console tab in DevTools. A CORS error such as Cross-Origin Request Blocked or a message like Failed to load module script points to the file:// protocol problem. A 404 on app.js means the script tag path is wrong.Fix:-
Verify the
<script>tag at the bottom ofindex.htmlreads exactly:Thetype="module"attribute is required. Without it, theimportstatements insideapp.jswill throw a syntax error. -
Do not open
index.htmlby double-clicking it. Use a local HTTP server instead:Then visit http://localhost:8000.
Logo does not appear
Logo does not appear
Cause: The logo image file
assets/images/treasure-hunt-logo.png is missing from the repository, or has been renamed or moved.How to confirm: Open the Network tab in DevTools and look for a 404 on treasure-hunt-logo.png.Fix:-
Confirm the file exists at exactly
assets/images/treasure-hunt-logo.png. -
The logo is referenced in two places in
index.html— both use the same relative path: - If you are replacing the logo, keep the filename and path identical so no HTML changes are needed. The README notes: “The logo file can be replaced without changing the game logic as long as the path remains the same.”
Board looks stretched or misaligned
Board looks stretched or misaligned
Cause: The CSS rules for If a local style override is changing
#maze-board have been modified or overridden. The board must be an exact 8×8 CSS grid with equal columns and rows.How to confirm: Open the Elements tab in DevTools, select the #maze-board div, and inspect its computed styles. The grid-template-columns value should be repeat(8, 1fr).Fix: styles.css defines #maze-board with the following critical properties — do not override them:grid-template-columns to anything other than repeat(8, 1fr), the 64 cells app.js renders will not fill an 8×8 grid and the board will appear stretched, cropped, or misaligned. Remove the conflicting rule to restore the correct layout.GitHub Pages shows a blank page
GitHub Pages shows a blank page
Cause 1: The Fix for absolute paths: Confirm that all asset references in Do not change these to
.nojekyll file is missing from the repository root. GitHub Pages runs Jekyll by default, and Jekyll can strip or ignore files that prevent the JavaScript modules from loading correctly.Cause 2: One or more asset paths in index.html or styles.css use absolute paths (starting with /) instead of relative paths (starting with ./ or just the folder name). Absolute paths break when GitHub Pages hosts the site under a subdirectory like https://<username>.github.io/<repo-name>/.Fix for missing .nojekyll:index.html use relative paths. The correct patterns are:/assets/css/styles.css — the leading slash makes the path relative to the domain root, which breaks the subdirectory-hosted GitHub Pages URL.After pushing the fix, wait 1–2 minutes for GitHub Pages to redeploy, then hard-refresh the page (Ctrl + Shift + R / Cmd + Shift + R).Agent never moves after clicking Start Race
Agent never moves after clicking Start Race
Cause: The race has not been properly started, the previous race has already ended (setting
raceOver to true internally), or a JavaScript error stopped execution before the agent timer could be set.How to confirm: Open the Console tab in DevTools and look for any red errors. If raceActive is false when moveAgentOnce() runs, the function returns immediately without moving the agent.Fix:- Click Reset to clear the current race state and restore
raceActiveandraceOverto their defaults. - Click Start Race. The status pill will change from Ready to Race Running and the agent will begin moving after its configured
startDelay. - If the agent still does not move, check the Console tab for JavaScript errors. Any uncaught error thrown during
startRace()or thesetIntervalcallback will silently halt agent movement.
New Maze button generates the same maze repeatedly
New Maze button generates the same maze repeatedly