TypeError: Cannot read properties of undefined (reading 'setup')
tienpvse1 opened this issue · 3 comments
tienpvse1 commented
Describe the bug
Hi everyone, I'm kinda new to Sveltekit and Houdini
Currently I'm facing an issue with SinglePage mode when using paginate query
- Sveltekit version: 2.0.0
- Houdini version: 1.2.34,
- houdini-svelte version: 1.2.34
Severity
serious, but I can work around it
Steps to Reproduce the Bug
my +page.gql look like this
query Launches {
launches(limit: 10) @paginate(mode: SinglePage) {
id
mission_name
}
}
And this is my +page.svelte
<script lang="ts">
import { Button } from 'flowbite-svelte';
import type { PageData } from './$houdini';
export let data: PageData;
$: ({ Launches } = data);
</script>
<Button color="alternative" on:click={() => data.Launches.loadNextPage()}>Load more</Button>
{#if $Launches.data?.launches}
{#each $Launches.data?.launches as launch}
<h1>{launch?.mission_name}</h1>
{/each}
{/if}
When I press the button the browser says:
Reproduction
No response
AlecAivazis commented
Hello @tienpvse1!
Unforunately there isn't enough information in this issue to debug what's going on. Can you put together a reproduction or push your code up somewhere?
tienpvse1 commented
Hi @AlecAivazis, here's the link of my repository: https://github.com/tienpvse1/houdini-sveltekit
AlecAivazis commented
I know its a bit late but I was able to reproduce this - working on a fix now