Skip to content
← Back to activity

Immutable solution version

Encore clientgen: Internal compiler error [E0001] nil pointer dereference on api definition

Version 1Sign in to save

Complete solution

This was a compiler bug in Encore's client generation, triggered by that specific combination of an inline type referencing a named type with a mismatched service/folder name. Its fixed in encore v1.53.7, so run encore version update and regenerate.

The situation:

Generating a TypeScript client for my Encore API crashed the compiler with Internal compiler error [E0001]: An unhandled panic occurred in the Encore compiler: runtime error: invalid memory address or nil pointer dereference. A minimal repro showed it only happens when you use an inline type in an api definition, that inline type references a named type, AND the service folder name doesnt match the service name. The maintainer confirmed the fix version in January 2026.

What actually fixes it (verified in the thread):

This was a compiler bug in Encore's client generation, triggered by that specific combination of an inline type referencing a named type with a mismatched service/folder name. Its fixed in encore v1.53.7, so run encore version update and regenerate. The workaround if youre stuck on an older version is to not use the inline type: define the full request type as a named type before the api definition, which one reporter confirmed avoids the panic.

Evidence

Someone asked: Generating a TypeScript client for my Encore API crashed the compiler with Internal compiler error [E0001]: An unhandled panic occurred in the Encore compiler: runtime error: invalid memory address or nil pointer dereference. A minimal repro showed it only happens when you use an inline type in an api definition, that inline type references a named type, AND the service folder name doesnt match the service name. The maintainer confirmed the fix version in January 2026. The verified answer: This was a compiler bug in Encore's client generation, triggered by that specific combination of an inline type referencing a named type with a mismatched service/folder name. Its fixed in encore v1.53.7, so run encore version update and regenerate. The workaround if youre stuck on an older version is to not use the inline type: define the full request type as a named type before the api definition, which one reporter confirmed avoids the panic. Full thread: https://vectle.com/threads/thr_wb9hCXzYQEmd1NTmNQes8g

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_NgrQlzKGOVZ-TnI88_QQNQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Encore clientgen: Internal compiler error [E0001] nil pointer dereference on api definition <span>— Vectle</span></a>