Skip to content

Demo is not working, hangs with "(hooks firing)" #169

@uh-zuh

Description

@uh-zuh

Describe the bug
Local copy of demo is not working. There is "(hooks firing)" on the page and no block with title "Single Page Application Router (SPAR) for Svelte 5+" in the bottom of page.

To Reproduce
Steps to reproduce the behavior:

  1. git clone
  2. cd demo
  3. npm install
  4. npm run dev
  5. Navigate to http://localhost:5174/
  6. Reload the page

Expected behavior
Demo is working as here: https://demo.router.svelte.spa/home

See the differences.

On site:
Image

On localhost with demo:
Image

Logs
There is error in console:

Uncaught Svelte error: invalid_snippet_arguments
A snippet function was passed invalid arguments. Snippets should only be instantiated via `{@render ...}`
https://svelte.dev/e/invalid_snippet_arguments

  in <unknown>
  in router.svelte
  in route-wrapper.svelte
  in home.svelte
  in router.svelte
  in route-wrapper.svelte
  in app.svelte
    invalid_snippet_arguments errors.js:43
    validate_snippet_args validation.js:13
    welcome home.svelte:16
    snippet2 snippet.js:69
    Router router.svelte:93
    pending_effect svelte-component.js:69
    update_reaction runtime.js:292
    update_effect runtime.js:472
    create_effect effects.js:126
    branch effects.js:389
    component svelte-component.js:69
    update_reaction runtime.js:292
    update_effect runtime.js:472
    create_effect effects.js:126
    block effects.js:377
    component svelte-component.js:54
    Router router.svelte:92
    add_svelte_meta context.js:49
    Router router.svelte:91
    pending_effect key.js:66
    update_reaction runtime.js:292
    update_effect runtime.js:472
    create_effect effects.js:126
    branch effects.js:389
    key key.js:66
    update_reaction runtime.js:292
    update_effect runtime.js:472
    #traverse_effect_tree batch.js:305
    process batch.js:212
    flush_effects batch.js:562
    flush batch.js:381
    ensure batch.js:460
    dequeue batch.js:69
    enqueue batch.js:471
    ensure batch.js:454
    internal_set sources.js:183
    set sources.js:162
    #trig utilities.svelte.ts:48
    set utilities.svelte.ts:90
    trace tracing.svelte.ts:32
    handleStateChange router-instance.svelte.ts:172
    Router router.svelte:76
    effect2 hmr.js:47
    update_reaction runtime.js:292
    update_effect runtime.js:472
    create_effect effects.js:126
    branch effects.js:389
    wrapper hmr.js:38
    update_reaction runtime.js:292
    update_effect runtime.js:472
    create_effect effects.js:126
    block effects.js:377
    wrapper hmr.js:28
    children home.svelte:307
    add_svelte_meta context.js:49
    children home.svelte:306
    snippet2 snippet.js:69
    snippet_effect snippet.js:49
    update_reaction runtime.js:292
    update_effect runtime.js:472
    create_effect effects.js:126
    branch effects.js:389
    snippet snippet.js:49
    update_reaction runtime.js:292
    update_effect runtime.js:472
    create_effect effects.js:126
    block effects.js:377
    snippet snippet.js:37
    Route_wrapper route-wrapper.svelte:84
    add_svelte_meta context.js:49
    Route_wrapper route-wrapper.svelte:84
errors.js:43:17

Additional context
It is needed to provide example for this bug: #85

Additional errors
1.

Type 'Route[]' is not assignable to type 'RouteConfig[]'.
  Type 'Route' is not assignable to type 'RouteConfig'.
    Types of property 'querystring' are incompatible.
      Type 'Query' is not assignable to type 'Record<string, ReturnParam>'.
        Index signature for type 'string' is missing in type 'Query'.

on line:


2. Property 'absolute' does not exist on type 'RouteResult' on line:

3.

Type '(route: Route) => boolean' is not assignable to type 'Hook'.
  Types of parameters 'route' and 'route' are incompatible.
    Type 'RouteResult' has no properties in common with type 'Route'.

on line:

(route: Route): boolean => {

4.

Type '(route: Route) => Promise<boolean>' is not assignable to type 'Hook'.
  Types of parameters 'route' and 'route' are incompatible.
    Type 'RouteResult' has no properties in common with type 'Route'.

on line:

async (route: Route): Promise<boolean> => {

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions