More

Troubleshooting and Limitations

Fix common problems, and see what emend does not do yet.

Most problems show an error message in the AI component. Find your problem below. Each entry lists the error code you may see, what went wrong, and how to fix it.

The install command fails on @emend/ai

@emend/ai is public on npm. Check that your npm registry can see it:

npm view @emend/ai version --registry=https://registry.npmjs.org/

If a private registry or an @emend:registry setting in .npmrc redirects the request, correct that setting. Immediately after a publication, npm may take a short time to serve the package; retry once it is visible. Then run the install command again.

The install fails with a Tiptap version conflict

npm may show ERESOLVE and name two different @tiptap/* versions. This happens when the component command adds a Tiptap package your editor did not have yet, such as @tiptap/markdown, at a newer version than the rest of your Tiptap packages.

Fix: Install the missing package at the same version as your other Tiptap packages, then run the component command again. To see your version, run npm ls @tiptap/react. For example:

pnpm add @tiptap/markdown@3.25.0

Or update all your Tiptap packages to the newest version together:

npx npm-check-updates --upgrade --filter "@tiptap/*" && npm install

The Bubble Menu does not open

Check that:

  1. You selected some text, and the editor still has focus.
  2. Your editor includes EmendAi, and you passed that same editor to AiBubbleMenu.
  3. There is no suggestion already waiting for Accept or Reject.
  4. The editor is editable.

The editor is not set up for AI

Error code: editor_not_configured

Why: The AI component did not get an editor with the EmendAi extension.

Fix: Add EmendAi to your editor's extensions. Wait until useEditor returns an editor, then pass that same editor to the AI component.

The request has too much text

Error code: context_too_large, or HTTP 413 from your server route

Why: The request has too much text. This can be the instruction, the selected text, the text the AI reads, or a long chat.

Fix: Select less text, let the AI read less (for example, the current paragraph instead of the whole document), or start a new chat in the AI Assistant.

The suggestion is out of date

Error code: stale_revision

Why: The document changed after you sent the request, so the suggestion is out of date.

Fix: Reject the suggestion, select the text again, and run the request again. An out-of-date suggestion can never be accepted.

The suggestion is blocked

Error code: schema_unsupported

Why: The text or the AI's answer contains something your editor cannot display.

Fix: Make sure all your @tiptap/* packages are on the same version, and that your editor has the extensions for the content you use (for example, tables). See supported content. You can still copy the AI's answer by hand.

The Accept button is disabled

Accept is disabled when:

  • The AI is still writing its answer.
  • The suggestion is out of date or blocked.
  • The suggestion replaces the whole document and you have not confirmed yet.

The message in the component tells you which one it is.

The route returns nothing

Check that:

  • The URL in createFetchTransport matches your route.
  • The request is a POST with JSON.
  • Your API key is set on the server.
  • Your authorize check allows the request.

A working route responds with text/event-stream; charset=utf-8.

What emend does not do yet

  • Only Next.js (App Router) is supported for now, together with React 19, Tailwind CSS 4, Shadcn, and Tiptap 3.7.1 or later. Other React frameworks may work, but we do not test them yet. Support for them is coming soon.
  • Suggestions can only be applied if they use supported content. Raw HTML and AI-generated images are not supported.
  • Sign-in, permissions, rate limits, saving, AI costs, and hosting are up to your app.
  • There is one server recipe so far: Vercel AI Gateway. More recipes are planned.

If the problem is with one component, compare your code with the example on its page: AI Bubble Menu, AI Composer, or AI Assistant.

On this page