encore
encore copied to clipboard
Unable to generate OpenAPI schema due to "Internal Compiler Error"
Hello. I tried to generate an OpenAPI schema for the first time. This is what happened:
phnx% encore gen client phoenix-api-kwr2 --lang=openapi --output=./openapi.json
error:
── Internal compiler error ────────────────────────────────────────────────────────────────[E0001]──
An unhandled panic occurred in the Encore compiler: runtime error: invalid memory address or nil
pointer dereference
This is a bug in Encore and should not have occurred. Please report this issue to the Encore team
either on Github at https://github.com/encoredev/encore/issues/new and include this error.
╭─[Stack Trace]
├─▶ clientgen.Client.func1 encr.dev/pkg/clientgen/client.go:65
├─▶ openapi.(*Generator).Generate.func1 encr.dev/pkg/clientgen/openapi/openapi.go:54
├─▶ json.(*encodeState).marshal.func1 encoding/json/encode.go:294
├─▶ json.(*encodeState).marshal.func1 encoding/json/encode.go:294
├─▶ json.(*encodeState).marshal.func1 encoding/json/encode.go:294
├─▶ openapi3.SchemaRef.MarshalJSON github.com/getkin/[email protected]/openapi3/refs.go:568
╰─[... remaining frames omitted ...]
other details:
this is a typescript api this has not been deployed to Encore Cloud yet
For visibility, this issue is being discussed on Discord: https://discord.com/channels/814482502336905216/1360749478390530230/1360749478390530230
Seeing same issue