-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Typescript] Openapi client genaration fails #1521
Comments
Does this work when you run |
Yes you are right. My fault it was a typo. interface A {} export const api_call = api( Works with: encore run. |
Getting the same error, worked fine initially but after running it a couple of times this pops up. error: An unhandled panic occurred in the Encore compiler: runtime error: invalid memory address or nil This is a bug in Encore and should not have occurred. Please report this issue to the Encore team ╭─[Stack Trace] |
interface A {}
interface B {}
interface Response {
data: A | B
}
export const api_call = api(
{ expose: true, auth: true, method: "GET", path: "/api/creatives" }, async (): Promise => {
return {} as Response
})
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/internal/clientgen/client.go:65
├─▶ openapi.(*Generator).Generate.func1 encr.dev/internal/clientgen/openapi/openapi.go:54
├─▶ json.(*encodeState).marshal.func1 encoding/json/encode.go:293
├─▶ json.(*encodeState).marshal.func1 encoding/json/encode.go:293
├─▶ json.(*encodeState).marshal.func1 encoding/json/encode.go:293
├─▶ json.(*encodeState).marshal.func1 encoding/json/encode.go:293
╰─[... remaining frames omitted ...]
The text was updated successfully, but these errors were encountered: