livebud / livebud/bud

Unable to live reload after SSR error

Open
#124 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
5.6k
Forks
175
PR merge metrics
No merged PRs in 30d

Description

Currently when there's a server-side rendering error, that you subsequently fix, you'll need to refresh the page again. This is likely because the event source isn't hooked up to that error yet.

Steps to reproduce:

1. Create a view with an error

```svelte

export let _string = ""
a.b = 'c'

{_string}

h1 {
background: blue;
padding: 20px;
color: white;
}

```

2. Make a change to the controller:

```go
package controller

type Controller struct {
}

func (c *Controller) Index() string {
return "hello world."
}

func (c *Controller) Show(id string) string {
return "shows/" + id
}
```

And you'll see something like `ReferenceError: a is not defined` in the browser. Even if you fix the problem in Svelte, it won't refresh.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the SSR error with the provided Svelte view and Go controller, then trace the event source used by the live-reload path. Done means correcting the view after the SSR error causes the browser to refresh without a manual page reload.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, javascript
Domain
full-stack, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.