Troubleshooting
Fixes for the most common setup problems.
The @ alias isn't pointing at src/. Check both:
tsconfig.json(andtsconfig.app.jsonin Vite):"paths": { "@/*": ["./src/*"] }- Vite only,
vite.config.ts:resolve: { alias: { "@": path.resolve(__dirname, "./src") } }
Then restart the dev server.
The editor was rendered on the server. Import it with next/dynamic and { ssr: false } from a client component, as shown in Basic editor. To show a saved document in a server component, use renderDocument(json) instead of mounting the editor.
- Make sure you're on Tailwind CSS v4. v3 isn't supported.
- Run
npx shadcn@latest initso your theme CSS variables exist. - Make sure your global CSS (with
@import "tailwindcss") is loaded on the page.
Installing an add-on only copies files. You also need to:
- Spread its extensions into your
extensionsarray. - Pass its slash category to
createEditorExtensions({ slashCategories: [...] }).
See Blocks and export.
The extensions array is being recreated on each render, so the editor is recreated too. Define it at module level, or wrap it in useMemo.
Pass onAskAI to Editor.FormattingToolbar. If you use Editor.Chrome with no children, it renders the toolbar without onAskAI, so list the children yourself. See Ask AI.
- Open the browser network tab and check the
POSTto your endpoint. 404: theendpointprop is wrong, or there's no/api/airoute on the same origin.500from the example server: the API key forAI_PROVIDERis missing fromserver/.env(GEMINI_API_KEY,ANTHROPIC_API_KEYorOPENAI_API_KEY).- A CORS error: your own backend must allow your app's origin.
- With the default transport, the response must be streamed plain text, not JSON. Use
sseTransportoraiSdkTransportfor those formats.
- Use
createEditorExtensions({ history: false }). - Pass
content: ""touseEditorand seed withuseSeedCollaborativeContent.
- Check that the server is running and the
urlmatches (ws://, nothttp://, and the/collaborationpath). - Both tabs must use the same
room. CollaborationPresenceshows the connection status.
Wrap your app in next-themes' ThemeProvider with attribute="class". See Light and dark mode.
Still stuck?
Open an issue on GitHub with your framework, the command you ran, and the full error.