Guides
Troubleshooting
Fixes for the problems people meet first, and Jali's development warnings.
On this page
- Nothing shows, or every pane is collapsed
- "Invalid hook call"
- Jali's styles are missing, or win over mine
- ⌘K does nothing
- The address doesn't change, and links don't reopen the layout
- An action returns { ok: false, reason: "unavailable" }
- Jali's keys don't work inside my pane
- With two instances, keys act on the wrong one
- Every pane is folded into tabs in my tests
- A linked Jali doesn't pick up my changes
- A hydration mismatch after server rendering
- createJali throws "no layout to start from can be shown"
- Development warnings
- Options Jali doesn't know
- Other warnings
Each problem below starts with what you see, then says why and how to fix it. Questions to ask before choosing Jali (server rendering, other frameworks, stability) are on Why Jali; its size is under What it costs. Jali's own messages start with Jali:, and the development-only ones are left out of production builds.
Nothing shows, or every pane is collapsed
Link to this section: Nothing shows, or every pane is collapsedYou see: an empty area, and in development Jali: the panes measure 0 pixels high, so every pane is collapsed.
Why: Jali fills the box you give it, and the box has no height.
Fix: give <JaliRoot> (or the element around <JaliView />) a height. Any of these works: height: 100% with html, body and #root at full height; 100dvh; or a grid or flex cell that has a height. See the CSS in the Quickstart and Build your own chrome.
"Invalid hook call"
Link to this section: "Invalid hook call"Why: the app bundles two copies of React. This happens when Jali is linked from a checkout or a monorepo and finds its own React beside its source.
Fix: with Vite, add resolve: { dedupe: ["react", "react-dom"] }; with webpack, alias react and react-dom to your app's copy. See Installation.
Jali's styles are missing, or win over mine
Link to this section: Jali's styles are missing, or win over mineWhy: the CSS cascade layers are in the wrong order, or jali/styles.css isn't imported.
Fix: import jali/styles.css once, and name the layer order before any of your styles: @layer base, jali; (with Tailwind 4, @layer theme, base, jali, components, utilities;). Styles in a later layer, or in no layer, win without !important. See Theming.
⌘K does nothing
Link to this section: ⌘K does nothingWhy: the palette is a feature, and it isn't on.
Fix: add palette() from jali-layout/palette to features, or use defaultFeatures(). If your app has its own command menu, leave it out on purpose and list Jali's commands with listCommands(jali).
The address doesn't change, and links don't reopen the layout
Link to this section: The address doesn't change, and links don't reopen the layoutWhy: the address is the urlSync() feature, and it isn't on.
Fix: add urlSync() from jali-layout/url to features (it is in defaultFeatures()). With a router, pass urlSync({ location }): see Keep the layout in the URL.
An action returns { ok: false, reason: "unavailable" }
Link to this section: An action returns { ok: false, reason: "unavailable" }Why: something it needs isn't there:
- Its feature.
jali.dialogs.openPalette()needspalette(),openSettings()needssettings(),choose()needschooser(), andstartRename()needsrename(). - A launcher, for Split and New tab.
- A curated page.
- Room. A phone shows one pane at a time.
Fix: add what's missing. Every refusal reason is listed under RefusalReason.
Jali's keys don't work inside my pane
Link to this section: Jali's keys don't work inside my paneWhy: your content stops every key from bubbling (stopPropagation on a container), so F6, ⌘K and Jali's commands never reach Jali.
Fix: call event.preventDefault() only on the keys your content handles, and let the rest bubble. An editor that needs every key marks itself data-pane-keys="content". See Commands and keys.
With two instances, keys act on the wrong one
Link to this section: With two instances, keys act on the wrong oneFix: give each keyboard: { scope: "local" }, its own id and label, and a prefix for one of their urlSync(). See Two instances on one page.
Every pane is folded into tabs in my tests
Link to this section: Every pane is folded into tabs in my testsWhy: jsdom lays nothing out, so a rendered root measures 0 by 0.
Fix: test rules without rendering, with createTestJali (1440 by 900 by default). When you do render, give the root element a clientWidth and clientHeight. See Test your layouts.
A linked Jali doesn't pick up my changes
Link to this section: A linked Jali doesn't pick up my changesWhy: a linked package resolves to its built dist/, which doesn't rebuild when its source changes.
Fix: rebuild it, or resolve its source with the "source" condition. See Installation.
A hydration mismatch after server rendering
Link to this section: A hydration mismatch after server renderingWhy: the server's first render and the browser's differ: another address, another size, or other inputs.
Fix: give the server urlSync({ location: memoryLocation(search) }) with the request's search, pass the same size on both sides, and make the instance from the same kinds and layout. See Server rendering and hydration.
createJali throws "no layout to start from can be shown"
Link to this section: createJali throws "no layout to start from can be shown"Why: it was given no layout, no presets and no page, or none of them can be shown: a ref of a kind not in panes, or a param its kind can't read. The first reason follows the colon.
Fix: pass a starting layout (or presets), made with your kinds' own calls (order({ id: 7 })).
Development warnings
Link to this section: Development warningsIn development, Jali warns once for each mistake it can catch early. A production build (NODE_ENV=production) drops these checks and their words.
Options Jali doesn't know
Link to this section: Options Jali doesn't knowcreateJali, definePane, definePage and <Activity> warn for each option they don't know (and createJali for each renamed message), so an options object built at run time can't silently fall back to defaults. Each starts Jali: <function> has no option "<name>", and ends with where the option went, or , and ignores it for any other unknown option:
| Option given | Warning ends with |
|---|---|
createJali({ keys }) | keys moved to keyboard.scope ("page", or "local" for "scoped") |
createJali({ keymap }) | keymap moved to keyboard.keymap |
createJali({ keyPrefix }) | keyPrefix moved to keyboard.prefix |
createJali({ reservedKeys }) | reservedKeys moved to keyboard.reserved |
createJali({ keymapOptions }) | keymapOptions moved to keyboard (keyboard.platform, keyboard.onInvalid, keyboard.words) |
createJali({ palette }) | palette is a feature: features: [palette()] from "jali-layout/palette" (leave it out for palette: false) |
createJali({ rename }) | rename is a feature: features: [rename({ can, run })] from "jali-layout/rename" |
createJali({ url }), not a writer | url is a feature: features: [urlSync({ location, prefix, sizes })] from "jali-layout/url" (url takes only a writer of your own) |
definePane({ minWidth }), maxWidth, comfortableWidth | minWidth moved to width: { min } (and { max }, { comfortable }) |
definePane({ minHeight }), maxHeight, comfortableHeight | minHeight moved to height: { min } (and { max }, { comfortable }) |
createJali({ messages: { workspace } }) | moved to messages.panes |
createJali({ messages: { announcements: { singleOn } } }), singleOff, notInvestigating | moved to messages.announcements.onePaneOn (and onePaneOff, nothingOpened) |
createJali({ messages: { page: { investigation } } }), investigating | moved to messages.page.openedLabel (and openedCount) |
<Activity a> (a prop: Jali: Activity has no prop "a") | a is activity (<Activity activity={…} />) |
Other warnings
Link to this section: Other warnings| Message starts with | What to do |
|---|---|
Jali: two Jali roots on this page share the id | Give each instance its own createJali({ id }) |
Jali: two instances on this page are both named | Give each its own label (or aria-label) |
Jali: kind "…" is defined twice | Each kind name once in panes |
Jali: two presets have the id | Give each preset its own id |
Jali: there is no preset | preset must name one of presets |
Jali: usePane(…) is called in a pane of kind | Call usePane(kind) with the kind of the pane it renders in, or usePane() |
Jali: this page has no parts to render it | Make the page with definePage from jali-layout/page |
Jali: pane … failed | A pane's component threw; pass onPaneError to report it |