For developers

9. Troubleshooting

From the THINQ Site developer guide, in the guide's own words. The same text ships with every site's core.

First, for almost anything odd after an update:

# stop the dev server
git pull
git submodule update --init
rm -rf .thinq/build          # keeps .thinq/content, your local admin edits
node core/scripts/dev.mjs --port 3311 --hostname 127.0.0.1

If it is still wrong, send Bo the full error text and the command you ran.

Errors you might see

Parsing CSS source code failed at a line in the thousands, like .p-\[var\(-\%\16 Be\)\]

The CSS file it names is generated, not your globals.css. Tailwind was scanning Next's binary build cache inside .thinq/build and reading junk as class names; it came back a while after every restart. Fixed in core on 2026-09-27. Update core (above) and also rm -rf .thinq (this one also resets your local content).

Module not found: Can't resolve '@/components/FooterParts' (or SiteNav, or another core import)

Your core/ checkout is older than the code you're using. git pull moved the pin, but the files in core/ didn't follow. Run git submodule update --init. git submodule status shows a leading + when core/ isn't at the pinned commit.

Could not find the Next.js package (next/package.json), PageNotFoundError: … /page, or a missing build-manifest.json

The dev server's working copy (.thinq/build) is in a half-built state: usually a sync or dependency install was interrupted, or a file landed somewhere the assembly doesn't expect. Stop the server, rm -rf .thinq/build, restart. If it comes back, run git status and look for files outside your own folders (a package.json, src/app or node_modules in the wrong place). Seen 2026-10-05; it cleared after the changes were reset, and the cause wasn't pinned down, so if you hit it, send the output.

A warning that the middleware file convention is deprecated means the build folder still holds files from an older core. Same fix.

Pages I made in the local admin disappear when I save a code file (and I get logged out)

The dev server used to rebuild its working copy on every save and delete what it didn't recognise, which included admin edits, uploads and the local admin account. Fixed in core on 2026-10-05: they now live in .thinq/content. Update core.

Type error in a header: Type '(item: string) => string' is not assignable to type 'ItemClass'

SiteNav's class callbacks receive the menu item ({ label, href, children? }), not a string, since 2026-10-06. Type the parameter as NavItem from @/lib/menus. For dropdownLinkClassName the first argument is the dropdown link and the second its parent:

linkClassName={(item: NavItem) => …}
dropdownLinkClassName={(child: NavItem, parent: NavItem) => …}

Left unfixed, this also stops core updates reaching the site (§8.6).

You cannot use different slug names for the same dynamic path ('child' !== '…')

Your repo has a route at src/app/[slug]/[something], beside core's section-page route src/app/[slug]/[child]. Next allows one parameter name per level: rename your folder to [child] (and the parameter in the file), which also makes your route replace core's for this site. Buffalo Gap's month archive was renamed this way on 2026-10-21.

Attempted to call navKey() from the server but navKey is on the client

A server component imported something from a "use client" module (@/components/SiteNav is one). In server components, import navKey and the menu types from @/lib/menus instead.

The admin build breaks with Can't resolve 'fs' (or node:fs, path) after adding a block

A block component (or something it imports) uses server-only code, and blocks are also loaded in the browser by the admin. Move the file reading into a route's page component, or into an API route the block calls (Blocks §4.6).

this site's next.config carries all of core's config fails in npm test

Your next.config.ts is a copy of core's (or sets its own output, cacheHandler or headers) and is missing something core's config now has; the message lists what. Replace the file with withCoreConfig, keeping only your own redirects or headers (§2.5).

Something looks wrong

Symptom Cause and fix
Literal <p> tags on the page A rich-text field (description, intro, body, …) rendered as {text}. Use SafeHtml (Blocks §4.3)
A field I set disappears after saving It isn't in the block's schema. Zod drops unknown fields
A page started returning 404 after I changed a block Its content no longer matches the schema. The server log says invalid page <slug>: …. Make the new field optional or add a default (Blocks §4.5)
My block isn't in the Add menu The feature isn't in registeredFeatures, the block isn't in its blocks list, or the dev server needs a restart
My theme isn't in Appearance It isn't in src/themes/index.ts
My theme's accent colours are ignored Settings → Brand color is set and overrides --sunset-1/2/3 (Themes §3.5)
A Tailwind class has no effect The class name was built from pieces (`bg-${c}`). Write the full class name in the code (Themes §3.7). Or it is one of container, table, size-full, w-100, which are never generated
My custom header has no menu, or the menu doesn't follow admin edits It is hand-written links. Build it from SiteNav (Header §5.1)
Dropdowns can't be opened on a tablet The arrow button is hidden (toggleClassName="hidden") (Header §5.3)
The logo shows the site name instead of the image site.header.logo isn't set on that site (Header §5.4)
A #link doesn't jump anywhere Nothing on the page has that id. Add an anchor field (Blocks §4.8)
A jump link lands under the sticky header Add scroll-mt-* to the section
My edits keep reverting You're editing .thinq/build or core/. Edit your repo
core/ is empty Cloned without --recurse-submodules. Run git submodule update --init
I changed a core file and it changed back It is core's. Send the change to Bo (§2.4)
Settings I added to content/site.json don't show on staging Seed content doesn't overwrite files edited on the site (Pages §6.6)
My tour/… pages vanished from the Pages list They are folded under the "/tour/…" row; click it, or search (Pages §6.4)
An image I uploaded locally is missing on staging Local uploads stay local. Upload on staging, or put code-owned images in public/
Changing the password in .env.local does nothing The local admin account already exists. Delete .thinq/content to re-seed it (this resets local content)

Embeds

Symptom Cause and fix
The browser console says Refused to load the script … Content Security Policy The script's host isn't allowed. Send the host to Bo for MYPRESS_SCRIPT_HOSTS (Embeds §7.2)
A widget's script loads but its content never appears Its data calls are blocked by the same allowlist (connect-src). Same fix
The Embed / Code block isn't offered, or an editor can't save it It is admin-only. Sign in as an admin
A Dancebug iframe stays blank The snippet was copied from an email that stripped its quotes, or two widgets on one page share id="dance_bug_iframe" (Embeds §7.3)
Dancebug registration sends me to the live site It returns to the address Dancebug has on file for that widget (Embeds §7.3)

Git

Symptom Cause and fix
A merge conflict on core Take main's pin: git checkout origin/main -- core, then git submodule update --init (§1.7)
A conflict in src/features/index.ts Keep core's entries and add yours last. If unsure, push the branch and ask
Staging isn't updating after a merge The host build failed and staging is still on the previous version. Run §8.4 locally, or ask Bo for the build log
Core fixes aren't reaching the site The cascade is failing for the site, usually a type error against new core (§8.6)

Fixed, in case you still see them

These were fixed in core in September and October 2026. If you see one, your core/ is old: update it.

  • Add block menu won't scroll, or the wheel scrolls the page instead (fixed 2026-09-25).
  • The preview panel hides the last blocks of the page (2026-09-25).
  • Menu links in preview go to the live site (2026-09-25).
  • A new form doesn't appear in the Form block (2026-09-25; it is now a dropdown).
  • Pricing, Stats or Event Tickets show literal <p> tags (2026-09-25).
  • Edits made through THINQ Connect don't show on the public page until something else is saved (2026-10-06).

The full list, with the reasons, is in CHANGELOG.md.

This text is maintained in thinq-site-core at docs/developers/09-troubleshooting.md (commit e72488e) and published here unchanged.